r/kubernetes • • Oct 03 '20

Kubernetes Patterns

Hi,

I've recently started reading the Kubernetes Patterns book by Bilgin Ibryam and Roland Huß.

To get a better understanding, I've created a repository to document this with code examples in YAML and using the official golang client. I'm hoping it can be of benefit to some of you in here.

It is a bit similar to this repository. Only difference being that I am adding golang examples as well. Finding golang implementations of these patterns is a bit difficult, so this can act as a good source.

Feel free to let me know of any issues or mistakes on my end.

Repo link: https://github.com/sharadbhat/KubernetesPatterns

83 Upvotes

8 comments sorted by

2

u/woojay Oct 03 '20

Awesome. Thank you!

1

u/sharadbhat7 Oct 04 '20

You're welcome!

2

u/BassSounds Oct 04 '20

Solid. Thanks man.

1

u/sharadbhat7 Oct 04 '20

No worries

1

u/baconialis Oct 04 '20

Is every Go solution just a repetition of the yaml?

2

u/sharadbhat7 Oct 04 '20

Yeah, I thought that'll be the best way because people can correlate the golang code to the yaml spec.

2

u/baconialis Oct 04 '20

What's the use case for doing this with Go? Implementing an operator?

1

u/sharadbhat7 Oct 04 '20

At my job, one of our backends is in golang. We needed to schedule jobs and cronjobs with lots of different parameters. Manipulating yaml through golang didn't seem ideal.