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.
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 tanzukubernetesreleases |
List available Tanzu Kubernetes releases. |
kubectl get tkr |
Short form version of the preceding command. |
kubectl get tkr v1.17.8---vmware.1-tkg.1.5417466 -o yaml |
Provides details on the named Tanzu Kubernetes release. |
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 virtualmachineimage |
List available Tanzu Kubernetes releases. |
kubectl get vmimage |
Short cut version of the preceding command. |
kubectl describe vmimage VM_IMAGE_NAME |
View details on the named VM image. |
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. |
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. |
kubectl get persistentvolumeclaim |
Lists the persistent volume claim resources in the current namespace, including resources used for clusters. See Using Persistent Storage in vSphere with Tanzu. |
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 Using Persistent Storage in vSphere with Tanzu. |
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 Get Tanzu Kubernetes Cluster Secrets. |