I think the lesson people need to start taking is that any form of declarative form of configuration will spawn an ad-hoc ecosystem to turn it imperative. The complexity of situations that can be expressed is by a configuration system is proportional to the complexity of that system. Simple and declarative is an oxymoron for anything but simple cases. Imperative systems can express arbitrary complexity and you will n…
The lesson is that shockingly few people have realized is that the problem space is not, nor has it ever been, served by declarative solutions. You can describe the state you want a system to be in but there will inevitably be procedures involved to do some of the work. It is unavoidable . At the point people began developing templating around their configuration, ah, templates... which themselves have imperative lan…
Deploying Kubernetes with Ansible
21–30 of 61 posts
Re: Deploying Kubernetes with Ansible
#22Earlier quoted context omitted.
The lesson is that shockingly few people have realized is that the problem space is not, nor has it ever been, served by declarative solutions. You can describe the state you want a system to be in but there will inevitably be procedures involved to do some of the work. It is unavoidable . At the point people began developing templating around their configuration, ah, templates... which themselves have imperative lan…
Do you have any examples of deploying to Kubernetes with something you consider real tools? I agree with what you are saying but have found very few real world companies using real languages for this.
Re: Deploying Kubernetes with Ansible
#23Not really the best technical solution for this challenge. And this is from a big Ansible + Packer person that deploys 10Ks of VMs and infrastructure with Ansible.
Re: Deploying Kubernetes with Ansible
#24Earlier quoted context omitted.
The problem is when you're in a situation where "over here we need YAML document A, and over there we need YAML document B." You either shove a templating system in front of your YAML and fight with that or throw in the towel just use a programming language where constructs in your YAML map to objects.
I think we need to burn this whole thing down and rethink it at this point. A huge amount of the total operational cost of our business is working around weird YAML problems and helm charts. Had one a while back where quoted strings containing padded numbers in were used for something. "01" fine ... "05" fine, "06" fine, "07" fine, "08" kaboom. 01-07 were treated as strings and 08 was suddenly being treated as octal,…
Try Tanka + Jsonnet to restore some of your sanity, also allows you to keep using Helm during your transition to a better place.
Re: Deploying Kubernetes with Ansible
#25Earlier quoted context omitted.
I think we need to burn this whole thing down and rethink it at this point. A huge amount of the total operational cost of our business is working around weird YAML problems and helm charts. Had one a while back where quoted strings containing padded numbers in were used for something. "01" fine ... "05" fine, "06" fine, "07" fine, "08" kaboom. 01-07 were treated as strings and 08 was suddenly being treated as octal,…
Helm is a pile of garbage. k8s speaks JSON just fine as expected. Try Tanka + Jsonnet to restore some of your sanity, also allows you to keep using Helm during your transition to a better place.
Re: Deploying Kubernetes with Ansible
#26Earlier quoted context omitted.
Helm is a pile of garbage. k8s speaks JSON just fine as expected. Try Tanka + Jsonnet to restore some of your sanity, also allows you to keep using Helm during your transition to a better place.
This is just the same problem in JSON, another loose schema’ed mess. Got my fair share of problems with that at the moment as well.
Definitely room for someone to make something better than Helm but I think you should give Jsonnet a shot if you haven't already.
Re: Deploying Kubernetes with Ansible
#27Re: Deploying Kubernetes with Ansible
#28What your Ansible is doing (looping over the inventory, imperatively executing tasks) is reinventing what a Kubernetes-internal Operator is doing after you asked it to reconcile your changes. Thing is: You're not only reinventing the internal thing, you will eventually recreate internal logic, e.g. some internal dependencies and knowledge "what to do in which order". Good luck with further developments on the Kubernetes upstream. Not cool.
Kubernetes does what it can, to give the user a declarative DX. You might not want to fight this. kustomize and some _trivial_ scripting is usually all you'll need. If you need more, consider writing custom Operators.
Re: Deploying Kubernetes with Ansible
#29Re: Deploying Kubernetes with Ansible
#30Gosh, I wish the author wouldn't sound so arrogant presenting me his reinvented wheel. What your Ansible is doing (looping over the inventory, imperatively executing tasks) is reinventing what a Kubernetes-internal Operator is doing after you asked it to reconcile your changes. Thing is: You're not only reinventing the internal thing, you will eventually recreate internal logic, e.g. some internal dependencies and kn…
So not just k8s alone, k8s + kustomize, no Helm charts, right?
or can you do k8s + Helm, no kustomize?
or can you do kustomize to deploy Helm charts which abstracts away and translates to underlying k8s API calls/generated YAML?