Chapter 2. Declarative Kubernetes Cluster Management

When you create a CRD, you can provide a custom controller with the proper logic to maintain the associated objects. In this way, you can extend the Kubernetes declarative API to embrace new kinds of objects. This is exactly the approach Cluster API uses to manage Kubernetes: it provides resources to represent Kubernetes clusters and the infrastructure itself.

Cluster API is a project created by the Kubernetes Cluster Lifecycle special interest group (SIG) to provide a consistent, modular platform for declarative Kubernetes cluster management. Leveraging kubeadm, Cluster API uses Kubernetes-style APIs to create, configure, and manage Kubernetes clusters and their infrastructure for a variety of deployment environments and providers.

Goals of Cluster API

The Kubernetes Cluster Lifecycle SIG created Cluster API to make cluster lifecycle management easier. Although Kubernetes itself has APIs for orchestrating containers regardless of the environment or provider, it doesn’t provide a consistent way to create new machines on arbitrary infrastructure. This means cluster lifecycle has to be handled uniquely depending on the environment.

The primary charter of the Kubernetes Cluster Lifecycle SIG is to make it easier to create, manage, upgrade, and retire Kubernetes clusters. The group decided to develop Cluster API as a framework for managing Kubernetes infrastructure across environments, with several goals in mind:

Declarative cluster ...

Get Cluster API and Declarative Kubernetes Management 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.