This went a different direction than I'd expected. That is, configuring your cluster resources rather than the host machines themselves. I managed to grab 5 or so Raspberry Pi 4s before the availability issues. I've been (slowly) getting a home Kubernetes cluster running over the last year or two, and Ansible helps immensely; I: * Write Ubuntu 20.04 (or now 22.04) to MicroSD card. * Configure the initial user + SSH-P…
Deploying Kubernetes with Ansible
11–20 of 61 posts
Re: Deploying Kubernetes with Ansible
#12Re: Deploying Kubernetes with Ansible
#13As your cluster grows, so does the complexity of managing it. That's where Ansible comes in.
Ideally the complexity of deploying ON a cluster (i.e. 'kubectl apply') doesn't increase with its size. In some ways it actually gets simpler, as you can worry less about per-node scheduling due to resource constraints/packing.
Re: Deploying Kubernetes with Ansible
#14I 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…
Declarative configuration is wholly expressible by imperative languages. The converse is not true. Declarative configuration is appropriate for declaring state (i.e., values), and not for describing procedures.
Stop using half-baked YAML crap and start using real tools.
Re: Deploying Kubernetes with Ansible
#15This went a different direction than I'd expected. That is, configuring your cluster resources rather than the host machines themselves. I managed to grab 5 or so Raspberry Pi 4s before the availability issues. I've been (slowly) getting a home Kubernetes cluster running over the last year or two, and Ansible helps immensely; I: * Write Ubuntu 20.04 (or now 22.04) to MicroSD card. * Configure the initial user + SSH-P…
`kubectl apply -f myshit/` is a faster way of getting things on your cluster, ansible is just a bunch of wrapper on top of that.
Edit: I'm not saying Ansible is an appropriate substitute (it absolutely isn't), rather that `kubectl -f` is not a scalable solution.
Re: Deploying Kubernetes with Ansible
#16Earlier quoted context omitted.
`kubectl apply -f myshit/` is a faster way of getting things on your cluster, ansible is just a bunch of wrapper on top of that.
Until you need to update it, or apply it to multiple environments, or any number of tasks where the concepts of configuration parameters and dependencies become important. Edit: I'm not saying Ansible is an appropriate substitute (it absolutely isn't), rather that `kubectl -f` is not a scalable solution.
Re: Deploying Kubernetes with Ansible
#17This went a different direction than I'd expected. That is, configuring your cluster resources rather than the host machines themselves. I managed to grab 5 or so Raspberry Pi 4s before the availability issues. I've been (slowly) getting a home Kubernetes cluster running over the last year or two, and Ansible helps immensely; I: * Write Ubuntu 20.04 (or now 22.04) to MicroSD card. * Configure the initial user + SSH-P…
`kubectl apply -f myshit/` is a faster way of getting things on your cluster, ansible is just a bunch of wrapper on top of that.
Re: Deploying Kubernetes with Ansible
#18Re: Deploying Kubernetes with Ansible
#19My conclusion is that using Ansible with Kubernetes is the WRONG way to go about it. So now instead of a directory of yaml or helm charts we have a bunch of ansible uselessly wrapping the yaml for application.
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.
Re: Deploying Kubernetes with Ansible
#20My conclusion is that using Ansible with Kubernetes is the WRONG way to go about it. So now instead of a directory of yaml or helm charts we have a bunch of ansible uselessly wrapping the yaml for application.
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.
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, which it's not and exploded.