Platform9 Cluster API Integration
What is CAPI?
Cluster API (CAPI) is a Kubernetes sub-project focused on providing declarative APIs and tooling to simplify provisioning, upgrading, and operating multiple Kubernetes clusters.
Started by the Kubernetes Special Interest Group (SIG) Cluster Lifecycle, the Cluster API project uses Kubernetes-style APIs and patterns to automate cluster lifecycle management for platform operators. The supporting infrastructure, like virtual machines, networks, load balancers, and VPCs, as well as the Kubernetes cluster configuration are all defined in the same way that application developers operate deploying and managing their workloads. This enables consistent and repeatable cluster deployments across a wide variety of infrastructure environments.
The Cluster API brings declarative, Kubernetes-style APIs to cluster creation, configuration and management.
For more information about Cluster API, read The Cluster API Book.
Platform9 CAPI Integration
Platform9 Cluster API Integration offers you the portability and extensibility of the open-source Cluster API(CAPI) project, with the streamlined and fully-managed experience of Platform9.
With Cluster API, Platform9 brings to you our next-generation Kubernetes Cluster Management, succeeding Platform9's Qbert API based clusters. It offers clusters based on Cluster API(CAPI), which is extended to integrate transparently into the rest of the Platform9 Stack.
Platform9 integrates Cluster API into Platform9's SaaS Management plane so that you don't have to manage CAPI lifecycle; which means cluster provisioning & lifecycle-management is easy and out of the box for you.
CAPI Clusters
Platform9 supports provisioning & lifecycle-management of following type of clusters using CAPI today.
The AWS and EKS Kubernetes cluster creation and management using Cluster API is a Limited Availability feature in PMK 5.7. We are actively working on making this feature GA over our next release.
Platform9 Cluster API Concepts
Platform9 SaaS Management Plane
Cluster API requires a Kubernetes cluster known as a Management Cluster that manages the lifecycle of Workload Clusters. It is where one or more Infrastructure Providers run, and resources such as Machines are stored.
Platform9 has integrated the Management Cluster capabilities in the Platform9 SaaS Management Plane so that you don't have to run and manage the life cycle of the management cluster. It also means that all the Cluster API components are always up to date and managed for you.
Workload cluster
A workload cluster is a Kubernetes cluster whose lifecycle is managed by a CAPI Management Cluster.
Infrastructure provider
Infrastructure providers are sources of computational resources, such as compute and networking. For example, cloud Infrastructure Providers include AWS, Azure, and Google, and bare metal Infrastructure Providers include VMware, MAAS, and metal3.io. They run as controllers along with other CAPI services and serve as interfaces between the management cluster and the IaaS Platform.
When there is more than one way to obtain resources from the same Infrastructure Provider (such as AWS offering both EC2 and EKS), each way is referred to as a variant.
Bootstrap provider
The Bootstrap Provider is responsible for:
- Generating the cluster certificates, if not otherwise specified.
- Initialising the control plane, and gating the creation of other nodes until it is complete.
- Joining control plane and worker nodes to the cluster.
Platform9 has developed it own bootstrap provider Nodelet for Native clusters such as on AWS. Whereas managed clusters such as EKS use the bootstrap provider like EKS provided by the Infrastructure Provider
Control plane
Platform9 uses its own provider Nodelet to bootstrap the control plane. As of v1beta1, it exposes the configuration via the NodeletControlPlane
object. The controller, nodelet-control-plane-controller-manager
, can then create Machine and BootstrapConfig objects based on the requested replicas in the NodeletControlPlane
object.
External control planes are offered and controlled by some system other than Cluster API, such as GKE, AKS, EKS, or IKS. Eg: AWSManagedControlPlane
for EKS.
Sunpike
Sunpike is a custom Kubernetes API Server running the Platform9 SaaS Management Plane which will store all the CAPI Custom Resources which define your clusters.
Custom Resource Definitions
A CustomResourceDefinition(CRD) is a built-in resource that lets you extend the Kubernetes API. Each CustomResourceDefinition represents a customization of a Kubernetes installation.
CRDs are CAPI specific, Provider Specific(Infrastructure, Bootstrap, Control Plane etc) or PMK specific.
A Group of Custom Resources(CRs - Instances of CRDs) define and construct a CAPI cluster.