Wanna run Kubernetes at home? Here's an easy way to do that.
What is openSUSE Kubic?
openSUSE Kubic is a community Linux distribution intended for running server side containers.
It's also a Kubernetes conformant distribution, so container orchestration is no problem.
openSUSE Kubic is read-only transaction OS, similar to Fedora Silverblue and Fedora CoreOS.
This distribution supports atomic rollbacks and separates user-data and container data out to
/var, which is in it's own partition.
The supported container runtimes are cri-o and Podman. Docker is unsupported, but compatible with the commands of Podman.
Let's install the OS.
Initialize Kubernetes on the host
Ensure that the Pod network CIDR is set for the Flannel Container Network Interface (CNI).
kubeadm init --pod-network-cidr=10.244.0.0/16
If you had DNS issues on throughout the installation, you will need to unfortunately configure the network's default gateway. Go to
/etc/sysconfig/network/routes and add the line:
Now that Kubernetes has been initialized on the node, you'll need to add the kubeconfig to your home folder so you can talk to the Kubernetes API.
Test that you can talk to the API
The following command will return status information if all is well
Setting things up
Allow Pods to run on the master
The following command removes the limitation of running Pods on the master node.
kubectl taint nodes --all node-role.kubernetes.io/master-
Install a Network Overlay
For this setup we'll be using the Flannel CNI. Flannel is a simple Container Network Interface which allows service to talk to each other. For a more advanced CNI which provides PodNetworkPolicies check out Calico.
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Verifying the setup
The following command will output all Pods in all namespaces.
kubectl get pods -A
I've found openSUSE Kubic to be one of the easiest methods for bringing up a Kubernetes cluster inside a VM or on real hardware that is also specifically designed for containers. I've been running it at home for almost a month and it seems to be generally stable (just make sure that you have at least 6GB of RAM for system stability).