Quick Start Guide#
On completion of the Quick Start you will have a full Kubernetes cluster with a single node that includes both the controller and the worker. Such a setup is ideal for environments that do not require high-availability and multiple nodes.
Note: Before proceeding, make sure to review the System Requirements.
Though the Quick Start material is written for Debian/Ubuntu, you can use it for any Linux distro that is running either a Systemd or OpenRC init system.
Run the k0s download script to download the latest stable version of k0s and make it executable from /usr/bin/k0s.
curl -sSLf https://get.k0s.sh | sudo sh
Install k0s as a service
k0s installsub-command installs k0s as a system service on the local host that is running one of the supported init systems: Systemd or OpenRC. You can execute the install for workers, controllers or single node (controller+worker) instances.
Run the following command to install a single node k0s that includes the controller and worker functions with the default configuration:
sudo k0s install controller --single
k0s install controllersub-command accepts the same flags and parameters as the
k0s controller. Refer to manual install for a custom config file example.
Is's possible to set environment variables with the install command:
sudo k0s install controller -e ETCD_UNSUPPORTED_ARCH=arm
The system service can be reinstalled with the
sudo k0s install controller --single --force sudo systemctl daemon-reload
Start k0s as a service
To start the k0s service, run:
sudo k0s start
The k0s service will start automatically after the node restart.
A minute or two typically passes before the node is ready to deploy applications.
Check service, logs and k0s status
To get general information about your k0s instance's status, run:
$ sudo k0s status Version: v1.24.3+k0s.0 Process ID: 436 Role: controller Workloads: true Init System: linux-systemd
Access your cluster using kubectl
Note: k0s includes the Kubernetes command-line tool kubectl.
Use kubectl to deploy your application or to check your node status:
$ sudo k0s kubectl get nodes NAME STATUS ROLES AGE VERSION k0s Ready <none> 4m6s v1.23.6+k0s
The removal of k0s is a two-step process.
Stop the service.
sudo k0s stop
k0s resetcommand cleans up the installed system service, data directories, containers, mounts and network namespaces.
sudo k0s reset
Reboot the system.
A few small k0s fragments persist even after the reset (for example, iptables). As such, you should initiate a reboot after the running of the
- Install using k0sctl: Deploy multi-node clusters using just one command
- Manual Install: (Advanced) Manually deploy multi-node clusters
- Control plane configuration options: Networking and datastore configuration
- Worker node configuration options: Node labels and kubelet arguments
- Support for cloud providers: Load balancer or storage configuration
- Installing the Traefik Ingress Controller: Ingress deployment information
- Airgap/Offline installation: Airgap deployment