Skip to content

Commit 797ddd3

Browse files
committed
feat(docs): refine cluster-api vsphere provider
1 parent 27af649 commit 797ddd3

5 files changed

+45
-26
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Cluster autoscaling
1+
# Cluster Autoscaler

docs/content/cluster-api/control-plane-provider.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ As result, `clusterctl` the following Cluster API components will be installed:
9595
* Bootstrap Provider in `capi-kubeadm-bootstrap-system` namespace
9696
* Kamaji Control Plane Provider in `kamaji-system` namespace
9797

98-
The next step, we will be to create a fully functional Kubernetes cluster on VMware vSphere using the Kamaji Control Plane Provider and the vSphere Infrastructure Provider. This is just an example, as Kamaji supports several other infrastructure providers.
98+
The next step, we will be to create a fully functional Kubernetes cluster using the Kamaji Control Plane Provider and the Infrastructure provider of choice.
9999

100100
For a complete list of supported infrastructure providers, please refer to the [other providers](other-providers.md) page.
101101

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# KubeVirt Infrastructure Provider
1+
# KubeVirt Infra Provider

docs/content/cluster-api/other-providers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Other Supported Infrastructure Providers
1+
# Other Infra Providers
22

33
Kamaji offers seamless integration with the most popular [Cluster API Infrastructure Providers](https://cluster-api.sigs.k8s.io/reference/providers#infrastructure):
44

docs/content/cluster-api/vsphere-infra-provider.md

+41-22
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# vSphere Infrastructure Provider
1+
# vSphere Infra Provider
22

33
Use the [vSphere Infrastructure Provider](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere) to create a fully functional Kubernetes cluster on **vSphere** using the [Kamaji Control Plane Provider](https://github.com/clastix/cluster-api-control-plane-provider-kamaji).
44

5-
!!! info "Virtual Machines Placement"
6-
As Kamaji decouples the Control Plane from the infrastructure, the Kamaji Management Cluster hosting the Tenant control Plane, is not required to be on the same vSphere where worker machines will be. As network reachability is satisfied, you can have your Kamaji Management Cluster on a different vSphere or even on a different cloud provider.
5+
!!! info "Control Plane and Infrastructure Decoupling"
6+
Kamaji decouples the Control Plane from the infrastructure, so the Kamaji Management Cluster hosting the Tenant Control Plane does not need to be on the same vSphere as the worker machines. As long as network reachability is satisfied, you can have your Kamaji Management Cluster on a different vSphere or even on a different cloud provider.
77

88
## vSphere Requirements
99

@@ -42,30 +42,30 @@ clusterctl init --ipam in-cluster
4242

4343
## Create a Tenant Cluster
4444

45-
Once all the controllers are up and running in the management cluster, you can apply the cluster manifests containing the specifications of the tenant cluster you want to provision.
45+
Once all the controllers are up and running in the management cluster, you can generate and apply the cluster manifests of the tenant cluster you want to provision.
4646

4747
### Generate the Cluster Manifest using the template
4848

4949
Using `clusterctl`, you can generate a tenant cluster manifest for your vSphere environment. Set the environment variables to match your vSphere configuration:
5050

5151
```bash
52-
# VSphere Configuration
52+
# vSphere Configuration
5353
export VSPHERE_USERNAME="[email protected]"
5454
export VSPHERE_PASSWORD="changeme"
5555
export VSPHERE_SERVER="vcenter.vsphere.local"
56-
export VSPHERE_DATACENTER: "SDDC-Datacenter"
57-
export VSPHERE_DATASTORE: "DefaultDatastore"
58-
export VSPHERE_NETWORK: "VM Networkt"
59-
export VSPHERE_RESOURCE_POOL: "*/Resources"
60-
export VSPHERE_FOLDER: "kamaji-capi-pool"
61-
export VSPHERE_TEMPLATE: "ubuntu-2404-kube-v1.31.0"
62-
export VSPHERE_TLS_THUMBPRINT: "..."
63-
export VSPHERE_STORAGE_POLICY: ""
64-
export KUBERNETES_VERSION: "v1.31.0"
65-
export CPI_IMAGE_K8S_VERSION: "v1.31.0"
66-
export CSI_INSECURE: "1"
67-
export VSPHERE_SSH_USER: "clastix"
68-
export VSPHERE_SSH_AUTHORIZED_KEY: "ssh-rsa AAAAB3N..."
56+
export VSPHERE_DATACENTER="SDDC-Datacenter"
57+
export VSPHERE_DATASTORE="DefaultDatastore"
58+
export VSPHERE_NETWORK="VM Network"
59+
export VSPHERE_RESOURCE_POOL="*/Resources"
60+
export VSPHERE_FOLDER="kamaji-capi-pool"
61+
export VSPHERE_TEMPLATE="ubuntu-2404-kube-v1.31.0"
62+
export VSPHERE_TLS_THUMBPRINT="..."
63+
export VSPHERE_STORAGE_POLICY=""
64+
export KUBERNETES_VERSION="v1.31.0"
65+
export CPI_IMAGE_K8S_VERSION="v1.31.0"
66+
export CSI_INSECURE="1"
67+
export VSPHERE_SSH_USER="clastix"
68+
export VSPHERE_SSH_AUTHORIZED_KEY="ssh-rsa AAAAB3N..."
6969
```
7070

7171
If you intend to use IPAM, set the environment variables to match your IPAM configuration:
@@ -100,10 +100,11 @@ export MACHINE_DEPLOY_REPLICAS=3
100100
export NAMESERVER="8.8.8.8"
101101
```
102102

103-
The following command will generate a cluster manifest based on the [`capi-kamaji-vsphere-template.yaml`](https://raw.githubusercontent.com/clastix/cluster-api-control-plane-provider-kamaji/main/templates/capi-kamaji-vsphere-template.yaml) template file:
103+
The following command will generate a cluster manifest based on the [`capi-kamaji-vsphere-template.yaml`](https://raw.githubusercontent.com/clastix/cluster-api-control-plane-provider-kamaji/master/templates/capi-kamaji-vsphere-template.yaml) template file:
104104

105105
```bash
106-
clusterctl generate cluster --from capi-kamaji-vsphere-template.yaml > capi-kamaji-vsphere-cluster.yaml
106+
clusterctl generate cluster \
107+
--from capi-kamaji-vsphere-template.yaml > capi-kamaji-vsphere-cluster.yaml
107108
```
108109

109110
### Apply the Cluster Manifest
@@ -140,12 +141,26 @@ and related tenant control plane created on Kamaji Management Cluster:
140141
kubectl get tcp -n default
141142
```
142143

144+
## Install the Tenant Cluster as Helm Release
145+
146+
Another option to create a Tenant Cluster is to use the Helm Chart:
147+
148+
```bash
149+
helm repo add clastix https://clastix.github.io/cluster-api-kamaji-vsphere
150+
helm repo update
151+
helm install sample clastix/cluster-api-kamaji-vsphere \
152+
--set cluster.name=sample \
153+
--namespace default \
154+
--values my-values.yaml
155+
```
156+
143157
## Access the Tenant Cluster
144158

145159
To access the tenant cluster, you can estract the `kubeconfig` file from the Kamaji Management Cluster:
146160

147161
```bash
148-
kubectl get secret sample-kubeconfig -o jsonpath='{.data.value}' | base64 -d > ~/.kube/sample.kubeconfig
162+
kubectl get secret sample-kubeconfig \
163+
-o jsonpath='{.data.value}' | base64 -d > ~/.kube/sample.kubeconfig
149164
```
150165

151166
and use it to access the tenant cluster:
@@ -157,7 +172,11 @@ kubectl cluster-info
157172

158173
## Cloud Controller Manager
159174

160-
The template file `capi-kamaji-vsphere-template.yaml` includes the external [Cloud Controller Manager (CCM)](https://github.com/kubernetes/cloud-provider-vsphere) configuration for vSphere. The CCM is a Kubernetes controller that manages the cloud provider's resources. The CCM is responsible for creating and managing the cloud provider's resources, such as Load Balancers, Persistent Volumes, and Node Balancers.
175+
The template file `capi-kamaji-vsphere-template.yaml` includes the external [Cloud Controller Manager (CCM)](https://github.com/kubernetes/cloud-provider-vsphere) configuration for vSphere. The CCM is a Kubernetes controller that manages the cloud provider's resources. Usually, the CCM is deployed on control plane nodes, but in this case, the CCM is deployed on the worker nodes as daemonset.
176+
177+
## vSphere CSI Driver
178+
179+
The template file `capi-kamaji-vsphere-template.yaml` includes the [vSphere CSI Driver]() configuration for vSphere. The vSphere CSI Driver is a Container Storage Interface (CSI) driver that provides a way to use vSphere storage with Kubernetes. The template file also include a default storage class for the vSphere CSI Driver.
161180

162181
## Delete the Tenant Cluster
163182

0 commit comments

Comments
 (0)