Tanzu Kubernetes Grid lets you perform various management operations on your NSX Advanced Load Balancer (ALB) deployment.
The Avi controller certificate expires periodically. In Tanzu Kubernetes Grid, you can update the Avi controller certificate when it expires. Before updating the certificate in the clusters, ensure that the certificate exists in Avi Controller.
To update the Avi Controller certificate:
Patch the certificate secret with the new string:
kubectl patch secret/avi-controller-ca --context <CLUSTER-CONTEXT> -n tkg-system-networking -p '{"data": {"certificateAuthorityData": "<ca-data>"}}' <"CERTIFICATE-STRING">
To update the Avi Controller credentials:
Re-encode the credentials into a base64-encoded string.
Patch the certificate secret with the new string:
kubectl edit secret avi-controller-credentials -n tkg-system-networking
Within your default text editor that pops up, update the credentials with the new base64 encoded credentials.
AKODeploymentConfig
CR Object for a ClusterTo know which AKODeploymentConfig
CR Object is used on the current cluster, run the following command:
kubectl --context={management cluster kubeconfig context} get cluster --show-labels
In the output, look at the networking.tkg.tanzu.vmware.com/avi=<AKODeploymentConfig-NAME>
field to view the AKODeploymentConfig object that has been selected by the cluster.
During the NSX Advanced Load Balancer configuration, Tanzu Kubernetes Grid validates the input that you specify for the configuration fields. Errors are logged when the system detects incorrect inputs. If the AVI_ENABLE
field is set to true
when deploying a management cluster, the Tanzu CLI performs a validation on the input that you specify for the following fields:
AVI_CONTROLLER
AVI_USERNAME
AVI_PASSWORD
AVI_CA_DATA_B64
AVI_CLOUD_NAME
AVI_SERVICE_ENGINE_GROUP
AVI_DATA_NETWORK
AVI_DATA_NETWORK_CIDR
AVI_MANAGEMENT_CLUSTER_SERVICE_ENGINE_GROUP
AVI_MANAGEMENT_CLUSTER_CONTROL_PLANE_VIP_NETWORK_NAME
AVI_MANAGEMENT_CLUSTER_VIP_NETWORK_NAME
AVI_CONTROL_PLANE_NETWORK
AVI_MANAGEMENT_CLUSTER_CONTROL_PLANE_VIP_NETWORK_CIDR
AVI_MANAGEMENT_CLUSTER_VIP_NETWORK_CIDR
AVI_CONTROL_PLANE_NETWORK_CIDR
When you create an AKODeploymentConfig
object, Tanzu Kubernetes Grid checks whether:
AKODeploymentConfig
object)spec.AdminCredentialRef
, spec.CertificateAuthorityRef
, and spec.Controller
fields have the correct input to connect to the AVI Controller.spec.CloudName
exists or it uses the AVI client that was initialized.spec.ServiceEngineGroup
exists or it uses the AVI client that was initialized.spec.ControlPlaneNetwork.Name
exists or it uses the AVI client that was initialized.spec.DataNetwork.Name
exists or it uses the AVI client that was initialized.spec.ControlPlaneNetwork.Name
has an IPAM profile configured or it does not use the AVI client that was initialized.spec.ControlPlaneNetwork.CIDR
has a valid format.spec.DataNetwork.CIDR
has a valid format.When you update an AKODeploymentConfig
object, Tanzu Kubernetes Grid checks whether spec.ClusterSelector
and spec.ControlPlaneNetwork
are unchanged. You cannot delete the install-ako-for-management-cluster
AKODeploymentConfig file.