Kubernetes Cluster API Developer Setup

I recently joined VMware, and one of my goals is to take a more active role in the Kubernetes (K8s) community. This goal has led me to Cluster API,  a project that introduces K8s orchestration with the use of declarative style API akin to the Kubernetes API. The cloud agnostic nature of Cluster API makes it an appealing solution for projects based on just about any cloud foundation.

This post aims to shorten your time to endorphins in part by curating the  Cluster API documentation. I found The Cluster API Book to contain a lot of great information (and I advise that you take a look at it), but this is me taking you straight to setting up your Cluster API environment. Below are steps that detail how to set up a local K8s cluster for Cluster API development on a laptop or desktop. For this, my machine is macOS Catalina, 8 core intel i9, 32 gb, and 1 TB. But before you proceed, I strongly encourage you to check out this article on the risks associated with the Linux utility Sudo. 

1. Install Ubuntu Multipass and Create Ubuntu VM 

Multipass is an Ubuntu  VM orchestrator for creating “mini-clouds.” Other hypervisors like Virtualbox can also be used but for my use case, creating and managing Ubuntu VMs, I prefer the usability of Multipass.

Install Multipass by going to the ubuntu website and  follow the install instructions. Once you’re done  with the installation, Multipass has various Ubuntu images available. 

  • Find the available images

~ % multipass find

  • Launch an Ubuntu 18.04 instance

~ % multipass launch -c 2 -d 32G -m 8G 18.04

This builds an Ubuntu VM with 2 CPUs, 32  gigs of storage and 8 gigs of memory.

  • Display VMs

~ % multipass list

  • Access the vm 

~ % multipass shell <name of vm>

2. Install Golang, Kubectl, Kind and Docker on the Ubuntu VM

Once logged into the VM install the packages from the links below:

Golang install instructions –

Kubectl install instructions –

Kind Install instructions –

Docker install instructions –

Configure docker for linux –

3. Create K8s/Kind cluster

The cluster API Book ( provides the instructions below on how to create a management cluster and install cClusterctl.

  • Create Kind config file

$ cat > kind-cluster-with-extramounts.yaml <<EOF

kind: Cluster



– role: control-plane


    – hostPath: /var/run/docker.sock

      containerPath: /var/run/docker.sock


  • Create Kind cluster

$ sudo kind create cluster –config kind-cluster-with-extramounts.yaml

  • Install cClusterctl (the Cluster API command line tool)

$ curl -L -o clusterctl

$ chmod +x ./clusterctl

$ sudo mv ./clusterctl /usr/local/bin/clusterctl

$ clusterctl version

  • Initialize the management cluster

$ sudo clusterctl init –infrastructure docker

4. Configure Google Cloud Registry, install Kustomize and Kubebuilder

The Cluster API developer section ( outlines the instructions below:

Follow the Google Cloud Registry steps and use the local shell setup on the VM  –

Optionally, a different registry can be used to manage images. More on this in the Cluster API book.

$ curl -s “\

kubernetes-sigs/kustomize/master/hack/”  | bash

$ sudo mv kustomize /usr/local/bin/

$ kustomize version

Kubebuilder install instructions –

$ go get -v

5. Deploy Cert-Manager and install Tilt

Don’t just deploy Cert-Manager as suggested here:

Start by checking (verify the installation) if Cert-Manager is installed as shown here:

If certificates get created then skip this step. If not, then install cert-manager using regular manifests.

Tilt installation –

$ /bin/bash -c “$(curl -fsSL”

$ sudo apt-get install build-essential

$ brew install gcc

$ curl -fsSL | bash

Clone Cluster API repo and create a tilt-settings.json file –

  • Start Tilt

$ tilt up

6. Set up X display for Tilt GUI

Install Firefox, xorg and openbox on the Ubuntu VM

Install XQuartz on your Mac

SSH with -X option from your Mac to the Ubuntu VM and run Firefox

The Tilt GUI will be at ‘http://localhost:10350/’ when you choose the Tilt browser option


While there has been an article that outlined the steps to set up Cluster API on a Virtualbox VM for development, I made the decision to go with  Multipass for its ease of use. I also cover two additional features from The Cluster API Book, Cert-Manager and Tilt. And finally, I show how to get to the Tilt GUI. In a nutshell, my setup shows an easy way to create a Kubernetes Cluster API development environment with Tilt, on an easy to manage virtual machine. So far, I’ve found the Cluster API community to be active, responsive and welcoming. You can join the Slack interactions at #cluster-api, and the special interest group is SIG Cluster Lifecycle. I look forward to sharing more on Kubernetes and Cluster API in the future.


Leave a Reply

Your email address will not be published.