Skip to content
Switch branches/tags

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time
Dec 24, 2017

Kubermatic machine-controller

Table of Contents


What works

  • Creation of worker nodes on AWS, Digitalocean, Openstack, Azure, Google Cloud Platform, VMWare Vsphere, Linode, Hetzner cloud and Kubevirt (experimental)
  • Using Ubuntu, Flatcar or CentOS 7 distributions (not all distributions work on all providers)

Supported Kubernetes versions

machine-controller tries to follow as close as possible the Kubernetes version support policy.

Currently supported K8S versions are:

  • 1.20
  • 1.19
  • 1.18
  • 1.17

What does not work

  • Master creation (Not planned at the moment)


Deploy the machine-controller

make deploy

Creating a machineDeployment

# edit examples/$cloudprovider-machinedeployment.yaml & create the machineDeployment
kubectl create -f examples/$cloudprovider-machinedeployment.yaml

Advanced usage

Specifying the apiserver endpoint

By default the controller looks for a cluster-info ConfigMap within the kube-public Namespace. If one is found which contains a minimal kubeconfig (kubeadm cluster have them by default), this kubeconfig will be used for the node bootstrapping. The kubeconfig only needs to contain two things:

  • CA-Data
  • The public endpoint for the Apiserver

If no ConfigMap can be found:


The CA will be loaded from the passed kubeconfig when running outside the cluster or from /var/run/secrets/ when running inside the cluster.

Apiserver endpoint

The first endpoint from the kubernetes endpoints will be taken. kubectl get endpoints kubernetes -o yaml

Example cluster-info ConfigMap

apiVersion: v1
kind: ConfigMap
  name: cluster-info
  namespace: kube-public
  kubeconfig: |
    apiVersion: v1
    - cluster:
      name: ""
    contexts: []
    current-context: ""
    kind: Config
    preferences: {}
    users: []




Simply run make test-unit


This project provides easy to use e2e testing using Hetzner cloud. To run the e2e tests locally, the following steps are required:

  • Populate the environment variable HZ_E2E_TOKEN with a valid Hetzner cloud token
  • Run make e2e-cluster to get a simple kubeadm cluster on Hetzner
  • Run hack/ to locally run the machine-controller for your freshly created cluster

If you want to use an existing cluster to test against, you can simply set the KUBECONFIG environment variable. In this case, first make sure that a kubeconfig created by make e2e-cluster at $(go env GOPATH)/src/ doesn't exist, since the tests will default to this hardcoded path and only use the env var as fallback.

Now you can either

  • Run the tests for all providers via go test -race -tags=e2e -parallel 240 -v -timeout 30m ./test/e2e/... -identifier $USER
  • Check test/e2e/provisioning/all_e2e_test.go for the available tests, then run only a specific one via go test -race -tags=e2e -parallel 24 -v -timeout 20m ./test/e2e/... -identifier $USER -run $TESTNAME

Note: All e2e tests require corresponding credentials to be present, check test/e2e/provisioning/all_e2e_test.go for details

Note: After finishing testing, please clean up after yourself:

  • Execute ./test/tools/integration/ while the machine-controller is still running
  • Execute make e2e-destroy to clean up the test control plane

You can also insert your ssh key into the created instances by editing the manifests in test/e2e/provisioning/testdata/


If you encounter issues file an issue or talk to us on the #kubermatic channel on the Kubermatic Slack.


Thanks for taking the time to join our community and start contributing!

Before you start

Pull requests

  • We welcome pull requests. Feel free to dig through the issues and jump in.


See the list of releases to find out about feature changes.