How to update service "kube-dns" in namespace kube-system to IPv6 from IPv4

hi, how do I update service “kube-dns” in namespace kube-system to IPv6 from IPv4 ? Now ClusterIP of service “kube-dns” is IPv4, following as :

[root@test ~]# kubectl get svc kube-dns -n kube-system
NAME       TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)                  AGE
kube-dns   ClusterIP   10.96.0.10   <none>        53/UDP,53/TCP,9153/TCP   24h
[root@test ~]#

You can’t change to IP family wholesale, but you can add IPv6 to it, or you can just delete it and recreate it with v6

how to delete and recreate kube-dns with v6 ?

kubectl delete, kubectl apply

The API docs for Service.spec.ipFamilies

1 Like

Thank you very much