Appendix C. Installing a CNI in a kind cluster

This appendix shows how to install a new CNI in your kind cluster. We’ll install Flannel and Calico, which are both used for the CKA exam, going through the process step by step on how to do this within a kind cluster. This involves creating the kind cluster without a CNI, installing the bridge CNI plugin, and then installing either Flannel or Calico.

C.1 Creating a kind cluster without CNI

Before we create a kind Kubernetes cluster, we must first create a YAML file that we can use as an input with the kind create command. Create a file named config.yaml and paste it in the contents like this:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  disableDefaultCNI: true
nodes:
role: control-plane ...

Get Acing the Certified Kubernetes Administrator Exam now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.