Attention: Deprecation notice for Bintray, JCenter, GoCenter and ChartCenter. Learn More


Chart version: 7.0.0
Api version: v1
App version: 1.19.0
Kubefarm cluster
Chart Type
Set me up:
helm repo add center
Install Chart:
helm install kubefarm center/kvaps/kubefarm
Versions (0)


Kubefarm combines everything need to spawn multiple Kubernetes-in-Kubernetes clusters and network booting configuration to simple bootstrap the physical servers from the scratch.

The project goals is to provide simple and unified way for deploying Kubernetes on bare metal.


Fast & Simple

There is no installation process as such, you just run your physical servers from scratch, during the boot they download the system image over the network and run it similar docker containers with overlayfs root.

You don’t have to think about redundancy and performing the updates for your OS anymore. Simple reboot is enough to apply new image.


You can spawn new Kubernetes clusters and PXE-servers using Helm very quickly, just providing all the parameters in simple Yaml form.


You can build your own image for the physical servers simple using Dockerfile. The default image is based on Ubuntu. You can put there anything need, simple add any additional packages and custom kernel modules.


You can deploy so many clusters as you want. All of them will have separated control-plane non visible for its consumers. Cert-manager will take care about the certificates.

Known components

Whole setup consist of few known components:

  • Kubernetes-in-Kubernetes - Kubernetes control-plane packed to Helm-chart, it is based on official Kubernetes static pod manifests and using the official Kubernetes docker images.
  • Dnsmasq-controller - simple wrapper for Dnsmasq which automates the configuration using Kubernetes CRDs and perform leader-election for the DHCP high availability.
  • LTSP - network booting server and boot time configuration framework for the clients written in shell. It allows to boot OS over the network directly to RAM and perform initial initial configuration for each server.


There is a number of dependencies needed to make kubefarm working:

The parent admin Kubernetes cluster is required to deploy user Kubernetes-in-Kubernetes control-planes and network booting servers for them. You can deploy admin Kubernetes cluster using your favorite installation method, for example you can use kubeadm or kubespray.

You might want untaint master nodes to allow run workload on them

  kubectl taint nodes --all

The cert-manager performs the certificates issuing for Kubernetes-in-Kubernetes and its etcd-cluster.

  kubectl apply --validate=false -f

You need an automated persistent volumes management for your cluster, local-path-provisioner is simpliest way to achieve that.

  kubectl apply -f

Optionaly any other csi-driver can be used.

You also need an automated external IP-addresses management, MetalLB is providing this opportunity.

  kubectl apply -f
  kubectl apply -f
  kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"

Also configure MetalLB Layer 2 address range after the installation.

These IP-addresses will be used for the child Kubernetes clusters and network booting servers.

High available DHCP-server wrapper allows to configure DHCP leases over Kubernetes. Additional DNS-server mode is allowed.

  kubectl create namespace dnsmasq
  kubectl create -n dnsmasq clusterrolebinding dnsmasq-controller --clusterrole dnsmasq-controller --serviceaccount dnsmasq:dnsmasq-controller
  kubectl create -n dnsmasq rolebinding dnsmasq-controller-leader-election --role dnsmasq-controller-leader-election --serviceaccount dnsmasq:dnsmasq-controller
  kubectl apply -n dnsmasq \
    -f \
    -f \
    -f \
    -f \
    -f \
    -f \
    -f \
  kubectl label node --all

You also need to deploy basic platform matchers for DHCP, they allows to detect the clients architecture (PC or EFI) to allow sending proper bootloader binary.

kubectl apply -n dnsmasq -f

Quick Start

Spawn new cluster:

helm repo add kvaps
helm show values kvaps/kubefarm --version 7.0.0 > values.yaml
vim values.yaml
helm install cluster1 kvaps/kubefarm --version 7.0.0 \
  --namespace kubefarm-cluster1 \
  --create-namespace \
  -f values.yaml


kubectl delete namespace cluster1


You can access your newly deployed cluster very quickly:

kubectl exec -ti `kubectl get pod -l app=cluster1-kubernetes-admin -o name` -- sh

External clients

To achieve that you need to specify correct hostname or IP-address for kubernetes.apiserver.certSANs in your values.yaml file.

Now you can get kubeconfig for your cluster:

kubectl get secret cluster1-kubernetes-admin-conf -o go-template='{{index .data "admin.conf" | base64decode }}'

you only need to correct the server address in it.


  • Apache-2.0 License