This chapter provides guidance on how to install and configure machine-controller in your Kubernetes cluster.
It is recommended to first familiarize yourself with the architecture documentation.
Before installing machine-controller, ensure you have:
kubectl configured to access your clustermachine-controller uses webhooks that require TLS certificates. Install cert-manager to automatically manage these certificates:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.2/cert-manager.crds.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.2/cert-manager.yaml
Wait for cert-manager to be ready:
kubectl wait --for=condition=available --timeout=300s deployment/cert-manager -n cert-manager
kubectl wait --for=condition=available --timeout=300s deployment/cert-manager-webhook -n cert-manager
kubectl wait --for=condition=available --timeout=300s deployment/cert-manager-cainjector -n cert-manager
The Operating System Manager is responsible for managing user data and operating system configurations for worker nodes:
kubectl apply -f https://github.com/kubermatic/machine-controller/raw/main/examples/operating-system-manager.yaml
Deploy the machine-controller to your cluster:
kubectl apply -f https://github.com/kubermatic/machine-controller/raw/main/examples/machine-controller.yaml
Check that machine-controller is running:
kubectl get pods -n kube-system | grep machine-controller
You should see the machine-controller pod in a Running state.
machine-controller can be configured through command-line flags or environment variables. The most common configurations include:
By default, machine-controller looks for a cluster-info ConfigMap in the kube-public namespace. This ConfigMap should contain the cluster CA certificate and API server endpoint.
If you’re using kubeadm, this ConfigMap is created automatically. Otherwise, you may need to create it manually.
Cloud provider credentials can be provided through:
Refer to the specific cloud provider documentation for detailed credential configuration.
After installation: