I am trying to expose a service using NodePort on a on premise bare metal kubernetes (1.17) cluster (calico for CNI and CRI-O 1.17)
- All nodes (Ubuntu 18.04) have IPv4 and IPv6 adresses and are reachable (e.g. ssh) using both
- Kubernetes has been initiated using kubeadm with IPv4
- A nginx test deployment is running and made reachable using a service with nodeport
I can curl the service using IPv4 successfully but not using IPv6 (connection is established but nothing transfered).
kubectl describe svc/example-service
Name: example-service
Namespace: default
Labels: <none>
Annotations: <none>
Selector: app=helloworld
Type: NodePort
IP: 10.97.69.135
Port: <unset> 5000/TCP
TargetPort: 5000/TCP
NodePort: <unset> 32042/TCP
Endpoints: 10.10.166.132:5000
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
On the host running this deployment:
netstat -tulpen|grep ':32042'
tcp6 0 0 :::32042 :::* LISTEN 0 10276301 2314/kube-proxy
kube-proxy obviously binds to tcp6 (with tcp4 compatibility mode) - therefore the connection can be established - but there is no data transfered using tcp6 (curl -6), tcp4 (curl -4) works as expected.
Does a cluster have to be configured in dual stack or IPv6 mode to receive IPv4 and IPv6 requests (e.g. via NodePort)?