Cluster API with Docker Provider: Declarative Workload Cluster Lifecycle

Expert · 60 minutes · 5 tasks, checked automatically · 100 points

In this expert-level lab you will bootstrap Cluster API (CAPI) with the Docker infrastructure provider (CAPD) onto your existing kind management cluster, then use CAPI's declarative API to create a workload cluster entirely from YAML manifests. Your LearnXops kind cluster does not hand the host's Docker socket to the pods running inside it, so instead of starting real node containers you will use CAPD's in-memory backend: CAPD simulates each machine, its kubeadm bootstrap, etcd and the workload cluster's API server inside the CAPD controller. Every Cluster API object and step is the same as with real infrastructure — you will provision a cluster from a ClusterClass, scale its MachineDeployment, inspect the resulting objects, and finally tear the workload cluster down cleanly. This lab covers the full CAPI lifecycle: initialization, provisioning, scaling, and deletion.

What you’ll learn

How this lab works

  1. Start the lab: One click starts a real Kubernetes cluster on your computer (kind), with kubectl ready in a toolbox terminal.
  2. Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
  3. Check your work: Check my work reads your live cluster and says, task by task, what passed and what to fix.
  4. Finish and keep going: 100 points, your progress saved, and the next lab to try.

What it runs on

What you need

Topics: cluster-api, capi, capd, docker-provider, kind, workload-cluster, clusterctl, machinedeployment, kubeadm, infrastructure-as-code

Create a free account to start this lab.

Keep going