Deploying a CNI Automatically with a ClusterResourceSet
Not too long ago I hosted an episode of TGIK8s, where I explored some features of Cluster API. One of the features I explored on the show was ClusterResourceSet, an experimental feature that allows users to automatically install additional components onto workload clusters when the workload clusters are provisioned. In this post, I’ll show how to deploy a CNI plugin automatically using a ClusterResourceSet.
A lot of this post is inspired by a similar post on installing Calico using a ClusterResourceSet. Although that post is for vSphere and this one focuses on AWS, much of the infrastructure differences are abstracted away by Kubernetes and Cluster API.
At a high level, using ClusterResourceSet to install a CNI plugin automatically looks like this:
- Make sure experimental features are enabled on your CAPI management cluster.
- Create a ConfigMap that contains the information to deploy the CNI plugin.
- Create a ClusterResourceSet that references the ConfigMap.
- Deploy one or more workload clusters that match the cluster selector specified in the ClusterResourceSet.
The sections below describe each of these steps in more detail.
Enabling Experimental Features
The preferred way to enable experimental features on your management cluster is to use a setting in the Continue reading