Skip to content

Cloud Controller Manager

The Kubernetes Cloud Controller Manager (CCM) plugin is designed to implement cloud-vendor specific features such as properly labeling nodes and providing LoadBalancer services. The Equinix Metal™-CCM currently implements the following:

  • nodecontroller - updates nodes with cloud provider specific labels and addresses

The CCM is great when paired with the Cluster Autoscaler as you don’t need to manually remove the logical nodes from the cluster.

Requirements:

You’ll need to clone the Equinix Metal CCM repository to get the necessary yaml deployment files. The files are located in the releases folder.

At the current state of Kubernetes, running the CCM requires a few things. Please read through the requirements carefully as they are critical to running the CCM on a Kubernetes cluster.

Version

Recommended versions of Equinix Metal CCM based on your Kubernetes version:

  • Equinix Metal CCM version v0.0.4 supports Kubernetes version >=v1.10

--cloud-provider=external

All kubelets (config file located in /etc/default/) in your cluster MUST set the flag --cloud-provider=external. The kube-apiserver and kube-controller-manager (both located in /etc/kubernetes/manifests) must NOT set the flag --cloud-provider which will default them to use no cloud provider natively.

WARNING: setting the kubelet flag --cloud-provider=external will taint all nodes in a cluster with node.cloudprovider.kubernetes.io/uninitialized. The CCM will then untaint those nodes when it initializes them. Any pod that does not tolerate that taint will be unscheduled until the CCM is running.

Kubernetes node names must match the device name

By default, the kubelet will name nodes based on the node's hostname. Equinix Metal's device hostnames are set based on the name of the device. It is important that the Kubernetes node name matches the device name.

Deployment

Token

To run the Equinix Metal CCM, you need your Equinix Metal API key and project ID that your cluster is running in. If you are already logged in, you can create one by clicking on your profile in the upper right then "API keys". To get project ID click into the project that your cluster is under and select "project settings" from the header. Under General you will see "Project ID". Once you have this information you will be able to fill in the config needed for the CCM.

Create config

Copy v0.0.4/secret.yaml to metal-config.yaml:

cp v0.0.4/secret.yaml ./metal-config.yaml

Replace the placeholder in the copy with your token. When you're done, the metal-config.yaml should look something like this:

apiVersion: v1
kind: Secret
metadata:
  name: metal-config
  namespace: kube-system
stringData:
  apiKey: "abc123abc123abc123"
  projectID: "abc123abc123abc123"

Then run:

kubectl apply -f metal-config.yaml

You can confirm that the secret was created in the kube-system with the following:

$ kubectl -n kube-system get secrets metal-config
NAME                  TYPE                                  DATA      AGE
metal-config   Opaque                                1         2m

CCM

You can apply the rest of the CCM by running:

kubectl apply -f deployment.yaml

or by using the Equinix Metal Helm Chart for CCM.