You can manage Tanzu Kubernetes clusters using custom kubectl commands. These commands are made available by custom resources created by the Tanzu Kubernetes Grid Service.

Custom Commands to Manage Tanzu Kubernetes Clusters

The table lists and describes kubectl commands for managing Tanzu Kubernetes clusters.

Table 1. Custom Commands to Manage Tanzu Kubernetes Clusters
Command Description
kubectl get tanzukubernetescluster
Lists the clusters in the current namespace.
kubectl get tkc
Short form version of the preceding command.
kubectl describe tanzukubernetescluster CLUSTER-NAME
Describe the specified cluster, showing the expressed state, status, and events. When provisioning is complete, this command shows the virtual IP created for the load balancer that fronts Kubernetes API endpoints.
kubectl get cluster-api
Lists the Cluster API resources supporting the clusters in the current namespace, including resources from the Cluster API project and from the Cluster API Provider used by the Tanzu Kubernetes Grid Service.
kubectl get virtualmachine
Lists the virtual machine resources supporting the cluster nodes in the current namespace.
kubectl get vm
Short form version of the preceding command.
kubectl describe virtualmachine VIRTUAL-MACHINE-NAME
Describe the specified virtual machine, showing the state, current status, and events.
kubectl describe virtualmachinesetresourcepolicy
List the Virtual Machine Set Resource Policy resources supporting the cluster in the current namespace. This resource represents the vSphere objects resource pool and folder used for the cluster.
kubectl get virtualmachineservice
Lists the Virtual Machine Service resources supporting the cluster nodes in the current namespace. These resources are analogous to a service, but for virtual machines instead of pods. Virtual machine services are used both for providing a load balancer for the control plane nodes of a cluster and by the paravirtual cloud provider to support a Kubernetes Service of type LoadBalancer within a cluster. See also the command kubectl loadbalancer.
kubectl get vmservice
Short form version of the preceding command.
kubectl describe virtualmachineservice VIRTUAL-MACHINE-SERVICE-NAME
Describe the specified Virtual Machine Service, showing the expressed cluster state, current status, and events.
kubectl get loadbalancer
Lists the load balancer resources in the current namespace, including those used for clusters. A load balancer is created for the Virtual Machine Service. See Tanzu Kubernetes Cluster Networking.
kubectl get virtualnetwork
Lists the virtual network resources in the current namespace, including resources used for clusters. A virtual network is created for each namespace where a cluster is provisioned, and for each cluster itself. See Tanzu Kubernetes Cluster Networking.
kubectl get persistentvolumeclaim
Lists the persistent volume claim resources in the current namespace, including resources used for clusters. See Storage in vSphere with Kubernetes.
kubectl get cnsnodevmattachment
Lists the CNS node virtual machine attachment resources in the current namespace. These resources represent the attachment of a persistent volume managed by CNS to a virtual machine serving as the node of a cluster. See Storage in vSphere with Kubernetes.
kubectl get configmap
Lists the configuration maps in the current namespace, including maps used for the creation of cluster nodes. Configuration maps are not intended to be user-modifiable, and any changes are overwritten.
kubectl get secret
Lists the secrets in the current namespace, including secrets used for the creation and management of cluster nodes. See Tanzu Kubernetes Cluster Secrets.