Notes On Kubernetes Clusterapi

References

  • KubeAcademy - ClusterAPI: course
  • Joe Beda on ClusterAPI: blog
  • An elevated view of TKGs: YouTube
  • Micheal West’s blog on TKC: blog
  • Ben Corrie’s 3 layer cake explaination: README
  • CAPI Provides Self Service Infrastructure: blog
  • Cluster API Provider for vSphere - Getting started: CAPV
  • Behind the Scenes with Cluster API Provider vSphere: blog
  • ClusterAPI Demystified: blog
  • Cluster API Provider for WCP: CAPW
  • CAPW Docs: CAPW
  • Cluster API and Machine Health: blog

Introduction

  • ClusterAPI provides declarative lifecycle management of conformant Kubernets clusters both on-prem and in cloud, and enables the management of supporting infrastructure (VMs, network, load balancer, etc).
  • ClusterAPI is a project of SIG Cluster Lifecycle. (Same group that created the kubeadm tool)
  • ClusterAPI is a set of CRDs that allows kubernetes to know how to interface with the infrastructure provider.
  • ClusterAPI also knows how an object of types Machine and Cluster represented.
  • The kubernetes cluster into which the ClusterAPI components are installed is called the Management cluster.
  • The Management cluster accepts manifests that declare how the workload cluster needs to be (eg. size of cluster, size of each node, overlay network types) and creates that workload cluster.
  • Simply editing the cluster spec will modify the workload cluster.
  • ClusterAPI uses Providers to interact with the underlying IaaS platforms.
  • ClusterAPI has many different providers available. One of them is ClusterAPI Provider for Vsphere (CAPV), that allows ClusterAPI to know how to communicate to vSphere to deploy Virtual Machines based on templates.
  • When a management cluster is deployed on vSphere using clusterctlor the tkg-cli tools, CAPV is used as the provider, and interfaces with CAPI, interacts with vSphere resources to realise the management cluster.
  • When a management cluster is deployed on vSphere using WCP, ClusterAPI Provider for WCP (CAPW) is used instead of CAPV.
  • There are different kinds of providers:
    • Infrastructure providers like CAPA, CAPV, CAPZ.
    • Bootstrap providers to support different ways to bootstrap a cluster or a node. eg CABPK.
Written on July 20, 2021