kubernetesmicrok8s

Microk8s on Linux - Wither /etc/kubernetes?


I've fired up a 6 node (3 Control Plane and 3 workers) Microk8s cluster on my Mac (for fun, shiggles and hopefully eventual profit) and it's seemingly happily running.

Question is,I'm now reading Kubernetes documentation that talks about modifying files in /etc/kubernetes, yet I'm not seeing that folder on my first control plane server.

Am I missing something? Does Microk8s (being a snap) keep this stuff elsewhere?

Edit

As @Glen Yu pointed out below, there are folders under the /var/snap/microk8s folder, but what I'm looking for specifically are files like the kube-apiserver.yaml file as referenced in this page: https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/


Solution

  • Think there is no direct analog. This page seems to indicate that the best one can hope for are the microk8s files.

    In my case, since I need to work on some secrets, it sounds like one has to first run pgrep -an kubelite then edit the file specified in the --apiserver-args-file argument (for 1.26 this seems to be /var/snap/microk8s/4959/args/kube-apiserver) and add the following line: --encryption-provider-config=/path/to/k8s-crypto.yaml and then restart the cluster with sudo systemctl restart snap.microk8s.daemon-kubelite