setup: Use kickstart instead of Ansible
Kubernetes, or rather mostly Calico, does not play well on a machine with an immutable root filesyste. Specifically, Calico needs write access to a couple of paths on the root filesystem, such as `/etc/cni/net.d`, `/opt/cni/bin`, and `/usr/libexec/kubernetes/kubelet-plugins/volume`. Some of those paths can be configured, but doing so is quite cumbersome. While these paths could be made writable, e.g. using symlinks or bind mounts, it would add a lot of complexity to the *kubelet* Ansible role. After considering the options for a while, I decided that the best approach was probably to mount specific filesystems at these paths. Instead of using small LVM logical volumes for each one, I thought it would be better to use a single *btrfs* filesystem for all the mutable storage locations. This way, if I discover more paths that need to be writable, I can create subvolumes for them, without having to try to move or resize the existing volumes. Now that the Kubernetes nodes need their own special kickstart file for the disk layout, it also makes sense to handle the rest of the machine setup there, too. This eliminates the need for the *kubelet* Ansible role altogether. Any machine provisioned with this kickstart configuration is immediately ready to become a Kubernetes control plane or worker node.
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
* Fedora Kubernetes packages 1.22
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Use the [`fedora-k8s.ks`][0] kickstart file
|
||||
|
||||
[0]: fedora-k8s.ks
|
||||
|
||||
|
||||
## Machine Setup
|
||||
|
||||
Add to *pyrocufflink.blue* domain:
|
||||
@@ -19,12 +26,6 @@ ansible-playbook \
|
||||
-e @join.creds
|
||||
```
|
||||
|
||||
Set up Kubernetes agent (`kubelet`):
|
||||
|
||||
```sh
|
||||
ansible-playbook -l k8s-amd64-ctrl0.pyrocufflink.blue kubelet.yml -b
|
||||
```
|
||||
|
||||
|
||||
## Initialize cluster
|
||||
|
||||
|
||||
Reference in New Issue
Block a user