Skip to content

Commit 3e284cd

Browse files
committed
feat(docs): document cluster-api controlplane provider
1 parent 3de661b commit 3e284cd

File tree

6 files changed

+117
-7
lines changed

6 files changed

+117
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Cluster autoscaling
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Kamaji Control Plane Provider
2+
3+
Kamaji can act as a Cluster API Control Plane provider via usage of the `KamajiControlPlane`, custom resource that defines the control plane of a Tenant Cluster.
4+
5+
Here an example of a `KamajiControlPlane`:
6+
7+
```yaml
8+
kind: KamajiControlPlane
9+
apiVersion: controlplane.cluster.x-k8s.io/v1alpha1
10+
metadata:
11+
name: '${CLUSTER_NAME}'
12+
namespace: '${CLUSTER_NAMESPACE}'
13+
spec:
14+
apiServer:
15+
extraArgs:
16+
- --cloud-provider=external
17+
controllerManager:
18+
extraArgs:
19+
- --cloud-provider=external
20+
dataStoreName: default
21+
addons:
22+
coreDNS: {}
23+
kubeProxy: {}
24+
konnectivity: {}
25+
kubelet:
26+
cgroupfs: systemd
27+
preferredAddressTypes:
28+
- InternalIP
29+
- ExternalIP
30+
- Hostname
31+
network:
32+
serviceAddress: '${CONTROL_PLANE_ENDPOINT_IP}'
33+
serviceType: LoadBalancer
34+
version: ${KUBERNETES_VERSION}
35+
```
36+
37+
You can use it as reference in a standard `Cluster` custom resource as controlplane provider:
38+
39+
```yaml
40+
kind: Cluster
41+
apiVersion: cluster.x-k8s.io/v1beta1
42+
metadata:
43+
labels:
44+
cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}'
45+
name: '${CLUSTER_NAME}'
46+
namespace: '${CLUSTER_NAMESPACE}'
47+
spec:
48+
controlPlaneRef:
49+
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
50+
kind: KamajiControlPlane
51+
name: '${CLUSTER_NAME}'
52+
clusterNetwork:
53+
pods:
54+
cidrBlocks:
55+
- '${PODS_CIDR}'
56+
services:
57+
cidrBlocks:
58+
- '${SERVICES_CIDR}'
59+
infrastructureRef:
60+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
61+
kind: ... # your infrastructure kind may vary
62+
name: '${CLUSTER_NAME}'
63+
```
64+
65+
!!! info "Full Reference"
66+
For a full reference of the `KamajiControlPlane` custom resource, please see the [Reference APIs](reference/api.md).
67+
68+
## Getting started with the Kamaji Control Plane Provider
69+
70+
Cluster API Provider Kamaji is compliant with the `clusterctl` contract, which means you can use it with the `clusterctl` CLI to create and manage your Kamaji-based clusters.
71+
72+
!!! info "Options for install Cluster API"
73+
There are two ways to getting started with Cluster API:
74+
* using `clusterctl` to install the Cluster API components as stated in this guide
75+
* using the Cluster API Operator. Please refer to the [Cluster API Operator](https://cluster-api-operator.sigs.k8s.io/) guide for this option.
76+
77+
### Prerequisites
78+
79+
* [`clusterctl`](https://cluster-api.sigs.k8s.io/user/quick-start#install-clusterctl) installed in your workstation to handle the lifecycle of your Kamaji-based clusters.
80+
* [`kubectl`](https://kubernetes.io/docs/tasks/tools/) installed in your workstation to interact with your Kamaji-based clusters.
81+
* [Kamaji](../getting-started/getting-started.md) installed in your Management Cluster.
82+
83+
### Initialize the Management Cluster
84+
85+
Using `clusterctl` to initialize the Management Cluster. When executed for the first time, `clusterctl init` will fetch and install the Cluster API components in the Management Cluster
86+
87+
```bash
88+
clusterctl init --control-plane kamaji
89+
```
90+
91+
As result, `clusterctl` the following Cluster API components will be installed:
92+
93+
* Cluster API Provider in `capi-system` namespace
94+
* Bootstrap Provider in `capi-kubeadm-bootstrap-system` namespace
95+
* Kamaji Control Plane Provider in `kamaji-system` namespace
96+
97+
We're still missing the infrastructure provider of choice, which is required to create a Kamaji-based cluster. And this is the next step.
98+

docs/content/cluster-api/index.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Cluster APIs Support
2+
3+
The [Cluster API](https://github.com/kubernetes-sigs/cluster-api) brings declarative, Kubernetes-style APIs to the creation, configuration, and management of Kubernetes clusters. If you're not familiar with the Cluster API project, you can learn more from the [official documentation](https://cluster-api.sigs.k8s.io/).
4+
5+
Users can utilize Kamaji in two distinct ways:
6+
7+
* **Standalone:** Kamaji can be used as a standalone Kubernetes Operator installed in the Management Cluster to manage multiple Tenant Control Planes. Worker nodes of Tenant Clusters can join any infrastructure, whether it be cloud, data-center, or edge, using various automation tools such as _Ansible_, _Terraform_, or even manually with any script calling `kubeadm`. See [yaki](https://goyaki.clastix.io/) as an example.
8+
9+
* **Cluster API Provider:** Kamaji can be used as a [Cluster API Control Plane Provider](https://cluster-api.sigs.k8s.io/reference/providers#control-plane) to manage multiple Tenant Control Planes across various infrastructures. Kamaji offers seamless integration with the most popular [Cluster API Infrastructure Providers](https://cluster-api.sigs.k8s.io/reference/providers#infrastructure).
10+
11+
Check the currently supported infrastructure providers and the roadmap on the related [repository](https://github.com/clastix/cluster-api-control-plane-provider-kamaji).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# vSphere Infrastructure Provider

docs/content/guides/cluster-api.md

-6
This file was deleted.

docs/mkdocs.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ site_author: bsctl
99
site_description: >-
1010
Kamaji deploys and operates Kubernetes Control Plane at scale with a fraction of the operational burden.
1111
12-
copyright: Copyright © 2020 - 2023 Clastix Labs
12+
copyright: Copyright © 2020 - 2025 Clastix Labs
1313

1414
theme:
1515
name: material
@@ -60,6 +60,11 @@ nav:
6060
- getting-started/getting-started.md
6161
- getting-started/kind.md
6262
- 'Concepts': concepts.md
63+
- 'Cluster API':
64+
- cluster-api/index.md
65+
- cluster-api/control-plane-provider.md
66+
- cluster-api/vsphere-infra-provider.md
67+
- cluster-api/cluster-autoscaler.md
6368
- 'Guides':
6469
- guides/index.md
6570
- guides/kamaji-azure-deployment.md

0 commit comments

Comments
 (0)