k0s
Key Features
- Available as a single static binary
- Offers a self-hosted, isolated control plane
- Supports a variety of storage backends, including etcd, SQLite, MySQL (or any compatible), and PostgreSQL.
- Offers an Elastic control plane
- Vanilla upstream Kubernetes
- Supports custom container runtimes (containerd is the default)
- Supports custom Container Network Interface (CNI) plugins (calico is the default)
- Supports x86_64 and arm64
Pre-requisite
We will need 1 VM to create a single node kubernetes cluster using k0s. We are using following setting for this purpose:
-
1 Linux machine,
ubuntu-22.04-x86_64or your choice of Ubuntu OS image,cpu-su.2flavor with 2vCPU, 8GB RAM, 20GB storage - also assign Floating IP to this VM. -
setup Unique hostname to the machine using the following command:
For example:
Install k0s on Ubuntu
Run the below command on the Ubuntu VM:
-
SSH into k0s machine
-
Switch to root user:
sudo su -
Update the repositories and packages:
-
Download k0s:
-
Install k0s as a service:
k0s install controller --single INFO[2021-10-12 01:45:52] no config file given, using defaults INFO[2021-10-12 01:45:52] creating user: etcd INFO[2021-10-12 01:46:00] creating user: kube-apiserver INFO[2021-10-12 01:46:00] creating user: konnectivity-server INFO[2021-10-12 01:46:00] creating user: kube-scheduler INFO[2021-10-12 01:46:01] Installing k0s service -
Start
k0sas a service: -
Check service, logs and
k0sstatus: -
Access your cluster using
kubectl:
Uninstall k0s
-
Stop the service:
-
Execute the
k0s resetcommand - cleans up the installed system service, data directories, containers, mounts and network namespaces. -
Reboot the system