Deploy clusters

Deploy Kubernetes clusters

Cluster API Provider Azure (CAPZ)

A management cluster is needed to deploy workload clusters. Please follow the instructions.

After the management cluster is provisioned, please run the following command in the root directory of the repo.

make deploy-workload-cluster

Customizations are supported by environment variables:

Environment variablesrequireddescriptiondefault
AZURE_SUBSCRIPTION_IDtruesubscription ID
AZURE_TENANT_IDtruetenant ID
AZURE_CLIENT_IDtrueclient ID with permission
CLUSTER_NAMEtruename of the cluster
AZURE_RESOURCE_GROUPtruename of the resource group to be deployed (auto generated if not existed)
MANAGEMENT_CLUSTER_NAMEtruename of the management cluster
KINDfalsewhether the management cluster is provisioned by kindtrue
WORKLOAD_CLUSTER_TEMPLATEfalsepath to the cluster-api templatetests/k8s-azure-manifest/cluster-api/vmss-multi-nodepool.yaml
CUSTOMIZED_CLOUD_CONFIG_TEMPLATEfalsecustomized cloud provider configs
AZURE_CLUSTER_IDENTITY_SECRET_NAMEfalsename of the cluster identity secretcluster-identity-secret
AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACEfalsenamespace of the cluster identity secretdefault
CLUSTER_IDENTITY_NAMEfalsename of the AzureClusterIdentity CRDcluster-identity
CONTROL_PLANE_MACHINE_COUNTfalsenumber of the control plane nodes1
WORKER_MACHINE_COUNTfalsenumber of the worker nodes2
AZURE_CONTROL_PLANE_MACHINE_TYPEfalseVM SKU of the control plane nodesStandard_D4s_v3
AZURE_NODE_MACHINE_TYPEfalseVM SKU of the worker nodesStandard_D2s_v3
AZURE_LOCATIONfalseregion of the cluster resourceswestus2
AZURE_CLOUD_CONTROLLER_MANAGER_IMG_REGISTRYfalseimage registry of the cloud-controller-managermcr.microsoft.com/oss/kubernetes
AZURE_CLOUD_NODE_MANAGER_IMG_REGISTRYfalseimage registry of the cloud-node-managermcr.microsoft.com/oss/kubernetes
AZURE_CLOUD_CONTROLLER_MANAGER_IMG_NAMEfalseimage name of the cloud-controller-managerazure-cloud-controller-manager
AZURE_CLOUD_NODE_MANAGER_IMG_NAMEfalseimage name of the cloud-node-managerazure-cloud-node-manager
AZURE_CLOUD_CONTROLLER_MANAGER_IMG_TAGfalseimage tag of the cloud-controller-managerv1.28.4
AZURE_CLOUD_NODE_MANAGER_IMG_TAGfalseimage tag of the cloud-node-managerv1.28.4
KUBERNETES_VERSIONfalseKubernetes components versionv1.28.0
AZURE_LOADBALANCER_SKUfalseLoadBalancer SKU, Standard or BasicStandard
LB_BACKEND_POOL_CONFIG_TYPEfalseLoadBalancer backend pool configuration type, nodeIPConfiguration, nodeIP or podIPnodeIPConfiguration
PUT_VMSS_VM_BATCH_SIZEfalseBatch size when updating VMSS VM concurrently0
AZURE_SSH_PUBLIC_KEYfalseSSH public key to connecet to the VMs""

To completely remove the cluster, specify the “${CLUSTER_NAME}” and run:

make delete-workload-cluster

Last modified July 9, 2024: doc: Enrich deploy-cluster.md (6df0b6e1f)