2.6 - Creating Management Clusters¶
Objectives¶
- List the steps involved in installing a TKG Management Cluster
- Describe what occurs when a management cluster is created
Installing TKG Instances¶
-
The Tanzu CLI creates a temporary bootstrap cluster, which is used to create the management cluster.
-
Note: Cluster = Collection of VMs (Nodes)
- The boostrap cluster will use the appropriate Cloud Infrastructure Provider to deploy the required resources
Deploying Management Clusters - vSphere 7¶
- When deploying management clusters on vSphere 7, there are two options:
- vSphere (Tanzu Enabled)
- Deploying a management cluster isn't supported
- The supervisor cluster performs the role of the management cluster
- The Tanzu CLI connects to the Supervisor cluster
- Carries out the roles associated with the management cluster
- vSphere (Tanzu Disabled)
- Deployed as per vSphere 6.7
Deploying Management Clusters: Installer UI or CLI¶
- Management clusters can be deployed via two main methods:
- Run the Tanzu Kubernetes Grid Installer
- Wizard providing guidance through the deployment process
- Recommended method - especially for platform operators new to TKG
- Configuration generated by the installer UI is saved to a YAML configuration file
- Create and edit YAML configuration files generated by the installer UI
- More advanced configuration options can be added prior to deployment
Tanzu CLI Management Cluster Plugin¶
- When deploying a management cluster using the Tanzu CLI, the
Tanzu Management-Cluster
plugin will be used
Tanzu CLI Management Cluster Create¶
- When using
tanzu management-cluster create
:
Tanzu Kubernetes Grid Installer¶
- Access the installer UI -
tanzu management-cluster create --ui
- Select the desired IaaS provider
- Assuming vSphere's selected, provide vCenter FQDN, username and password
- Auto-determines version of vSphere
- For vSphere 7 and above - additional dialog will be added questioning if Tanzu is already enabled on the cluster → Determines whether TKG Management cluster can be deployed or not.
- Specify the SSH public key associated with the datacenter
- Choose cluster plan to be developed and any additional configuration - development and production are pre-available by default
- Provide management cluster name
- Control plane endpoint - IP address for Kube-VIP to connect to
- Configure control plane and worker node size/resource configuration
- Optional - Configure the NSX Load Balancer e.g.
- FQDN Name (VM to connect to)
- Credentials
- Certificate Authority
- Load Balancing-specific configuration
- VIP Network name
- VIP Network CIDR
- Specify any metadata and labels to be applied to the cluster e.g. location, labels, description
- Specify the VM folder, datastore and compute resource
- Outline where the VMs should be stored
- What cluster, hosts and resource pools should be utilised?
- What datastore should be used?
- Specify the vSphere network, Kubernetes service and pod CIDR ranges
- Configure the CNI (Container Network Interface)
- Cluster CIDR - For Kubernetes services
- Cluster Pod CIDR
- Network name
- Configure Identity Management
- What provider is being used?
- What configuration is required for that provider? E.g. LDAP has its own particular configuration requirements
- Specify the base OS for Kubernetes to run on
- This will be the OS OVA file that was converted into a template
- Register the Management cluster with Tanzu Mission control if desired
- Deploy the cluster and wait
- Note the location where the configuration is stored.
Post-Installation¶
- Once installation is complete, the browser can be closed.
- The management cluster configuration file generated by the installer is saved to
.tanzu/tkg/clusterconfigs
- In the file are configuration parameters identical to those passed in the Wizard
- E.g. Plan chosen
- Kubernetes CIDRs
- VM Characteristics
Cluster API Configuration¶
- The cluster API components deployed to the management cluster are found at
.tanzu/tkg/providers
cluster-api/v0.3.13/core-components.yaml
control-plane-kubeadm/v0.3.14/control-plane-components.yaml
bootstrap-kubeadm/v0.3.14/bootstrap-components.yaml
Infrastructure Configuration¶
- Cluster API for vSphere controllers and CRDs listed in the following YAML file are deployed on the management cluster when running vSphere 6.7:
.tanzu/tkg/providers/infrastructure-vsphere/v0.7.7/infrastructure-components.yaml
- For vSphere 7 - no configuration is required as the supervisor cluster is preconfigured with Cluster API for vSphere controllers and CRDs
- AWS and Azure's provider deployment YAMLs are stored under the
.tanzu/tkg/providers/
folder if chosen as well
Management Cluster Deployment Workflow¶
-
The
tanzu management-cluster create
command:- Validates the provided configuration
- Using
kind
it creates a local boostrap cluster on the boostrap machine - The cluster API pods are deployed to the bootstrap cluster
- The requested management cluster configuration are deployed to the boostrap cluster using the Cluster API Custom Resource Definitions
- The cluster API provider for vSphere on the bootstrap cluster communicates with vSphere to clone and configure the cluster VMs in vSphere
- When the cluster is available, the Cluster API pods and configuration are moved to the vSphere management cluster
- The local bootstrap cluster is deleted
-
Note: Deployment will output particular logs associated with each step
-
Once deployment is completed, two VM types will be created,one for control plane nodes, another type for worker nodes.