kubernetes: Manage worker nodes

So far, I have been managing Kubernetes worker nodes with Fedora CoreOS
Ignition, but I have decided to move everything back to Fedora and
Ansible.  I like the idea of an immutable operating system, but the FCOS
implementation is not really what I want.  I like the automated updates,
but that can be accomplished with _dnf-automatic_.  I do _not_ like
giving up control of when to upgrade to the next Fedora release.
Mostly, I never did come up with a good way to manage application-level
configuration on FCOS machines.  None of my experiments (Cue+tmpl,
KCL+etcd+Luci) were successful, which mostly resulted in my manually
managing configuration on nodes individually.  Managing OS-level
configuration is also rather cumbersome, since it requires redeploying
the machine entirely.  Altogether, I just don't think FCOS fits with my
model of managing systems.

This commit introduces a new playbook, `kubernetes.yml`, and a handful of
new roles to manage Kubernetes worker nodes running Fedora Linux.  It
also adds two new deploy scripts, `k8s-worker.sh` and `k8s-longhorn.sh`,
which fully automate the process of bringing up worker nodes.
This commit is contained in:
2024-11-21 06:24:53 -06:00
parent 164f3b5e0f
commit 0f600b9e6e
18 changed files with 377 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
data_volumes:
- dev: /dev/vdb
fstype: ext4
mountpoint: /var/lib/containers
- dev: /dev/vdc
fstype: ext4
mountpoint: /var/lib/kubelet
- dev: /dev/vdd
fstype: ext4
mountpoint: /var/lib/longhorn
k8s_node_labels:
node-role.kubernetes.io/longhorn: ''
node.longhorn.io/create-default-disk: 'true'
k8s_node_taints:
- key: node-role.kubernetes.io/longhorn
effect: NoSchedule

View File

@@ -1 +1,12 @@
collectd_processes: '{{ collectd_processes_kubelet }}'
data_volumes:
- dev: /dev/vdb
fstype: ext4
mountpoint: /var/lib/containers
- dev: /dev/vdc
fstype: ext4
mountpoint: /var/lib/kubelet
k8s_node_labels:
network.du5t1n.me/storage: 'true'