Verifying dual-stack networking

Check whether a cluster assigns IPv4 and IPv6 addresses to Pods and Services by listing their addresses with kubectl.

You have a kubeconfig for the cluster.

  1. List the addresses of the Pods.
    kubectl get pods -o custom-columns=NAME:.metadata.name,IPS:.status.podIPs[*].ip

    In a dual-stack cluster, each Pod shows an IPv4 address and an IPv6 address, for example 192.0.2.15,2001:db8::f.

  2. Check the addresses of a Service.
    kubectl get service example-service -o jsonpath='{.spec.clusterIPs}'

    A Service with both address families shows one cluster IP address in each family.