services: k0s-controller: image: docker.io/k0sproject/k0s:{{{ k0s_docker_version }}} container_name: k0s-controller hostname: k0s-controller network_mode: bridge # other modes are unsupported ports: - 6443:6443 # publish the Kubernetes API server port volumes: - /var/lib/k0s # this is where k0s stores its data - /var/log/pods # this is where k0s stores pod logs - /dev/kmsg:/dev/kmsg:ro # required by kubelets OOM watcher tmpfs: - /run # this is where k0s stores runtime data devices: - /dev/kmsg # required by kubelet's OOM watcher cap_add: - sys_admin - net_admin - sys_ptrace - sys_resource - syslog security_opt: - seccomp:unconfined # allow access to the session keyring configs: - source: k0s.yaml target: /etc/k0s/k0s.yaml configs: k0s.yaml: content: | apiVersion: k0s.k0sproject.io/v1beta1 kind: ClusterConfig metadata: name: k0s spec: storage: type: kine # Any additional configuration goes here ...