Creating a Management Cluster
Purpose of Management Cluster
Workstation Setup
stateDiagram
direction LR
CreateManagementCluster --> CreateWorkloadCluster
state CreateManagementCluster {
direction LR
UseKind? --> WaitForUp
}
We will need a Kubernetes cluster setup on our workstation. This could be any of the following:
- Kind
- Minikube
- k3d
During testing on a Intel Macbook pro with 8 CPU and 16 CPU, we found out that kind cluster performed the best.
Please feel free to choose what you are familiar with and have proven sucess with.
Warning
We have noticed the following issues when we were running kubernetes clusters on local Mac/Windows
- Pods on
kube-systemnamespace may take about 10 minutes to download - Pods may take about 5 minutes to become
Readystate - Make sure the management cluster is fully functional before proceeding to creating workload cluster
Create Management Cluster
Follow steps here to create a kind mangement cluster
Install clusterctl
Follow procedure here to install clusterctl tool
A typical linux install command would like this, but do refer the link above for the latest command and your installation platform.
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.1/clusterctl-linux-amd64 -o clusterctl
Initialise Management Cluster
-
Create the following file in your workstation
-
Fill in the following contents
NUTANIX_ENDPOINT: "" # IP or FQDN of Prism Central NUTANIX_USER: "admin" # Prism Central user NUTANIX_PASSWORD: "" # Prism Central password NUTANIX_INSECURE: true EXP_CLUSTER_RESOURCE_SET: true # Experimental for testing CCM and Autoscaling EXP_MACHINE_POOL: "true" # Experimental CLUSTER_TOPOLOGY: "true" # Experimental KUBERNETES_VERSION: "v1.24.7" # use the kubernetes version from the image build information WORKER_MACHINE_COUNT: 3 NUTANIX_MACHINE_VCPU_SOCKET: 4 NUTANIX_MACHINE_MEMORY_SIZE: "8Gi" NUTANIX_SSH_AUTHORIZED_KEY: "ssh-rsa AAAAB3...." NUTANIX_PRISM_ELEMENT_CLUSTER_NAME: "" NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME: "xxxxxx" # use your image name from the previous section NUTANIX_SUBNET_NAME: "Primary" -
Instantiate the Cluster API to communicate with Nutanix Cluster
4. Make sure all pods are in a Running and healthy state in the following namespaces:Warning
If pods in the above name spaces are not running or have any errors, troubleshoot your CAPX deployment on management cluster.