The Tanzu Kubernetes Grid Service provisions Tanzu Kubernetes clusters with default networking for nodes, pods, and services. You can verify cluster networking using custom kubectl commands.

Custom Commands to Verify Tanzu Kubernetes Cluster Networking

Table 1. Custom kubectl Commands to Verify Cluster Networking
Command Description
kubectl get tkgserviceconfigurations
Returns the default CNI, which is antrea unless changed. The default CNI is used for cluster creation unless explicitly overridden in the cluster YAML. To change the default CNI, see Examples for Configuring the Tanzu Kubernetes Grid Service v1alpha1 API.
kubectl get virtualnetwork -n NAMESPACE
Returns the virtual network for cluster nodes. Use to verify that the source network address translation (SNAT) IP address is assigned.
kubectl get virtualmachines -n NAMESPACE NODE-NAME
Returns the virtual network interface for cluster nodes. Use to verify that the virtual machine for each cluster node has an IP address assigned.
kubectl get virtualmachineservices -n NAMESPACE 
Returns the virtual machine service for each cluster node. Use to verify that the status is updated and includes the load balancer virtual IP (VIP) address.
kubectl get services -n NAMESPACE
curl -k https://EXTERNAL-IP:PORT/healthz
Returns the Kubernetes service load balancer created for Cluster API access. Use to verify that an external IP is assigned. Use curl to verify access to the API using the external IP address and port of the load balancer service.
kubectl get endpoints -n NAMESPACE 
Returns the control plane nodes (endpoints) for the cluster. Use to verify that each endpoint is created and included in the endpoint pool.