Cluster information:
Kubernetes version:
Client Version: version.Info{Major:“1”, Minor:“21”, GitVersion:“v1.21.5”, GitCommit:“aea7bbadd2fc0cd689de94a54e5b7b758869d691”, GitTreeState:“clean”, BuildDate:“2021-09-15T21:10:45Z”, GoVersion:“go1.16.8”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1”, Minor:“21”, GitVersion:“v1.21.5”, GitCommit:“aea7bbadd2fc0cd689de94a54e5b7b758869d691”, GitTreeState:“clean”, BuildDate:“2021-09-15T21:04:16Z”, GoVersion:“go1.16.8”, Compiler:“gc”, Platform:“linux/amd64”}
Cloud being used: bare-metal
Installation method: kubespray
Host OS: ubuntu 20.04
CNI and version: calico
Client Version: v3.19.2
Git commit: 6f3d4900
Cluster Version: v3.19.2
Cluster Type: k8s,kdd,kubespray,bgp,kubeadm
CRI and version: Docker
Client: Docker Engine - Community
Version: 20.10.11
API version: 1.41
Go version: go1.16.9
Git commit: dea9396
Built: Thu Nov 18 00:37:08 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.11
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9
Git commit: 847da18
Built: Thu Nov 18 00:35:16 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Service.yaml
apiVersion: v1
kind: Service
metadata:
name: api
namespace: odim
spec:
ipFamilies:
- IPv4
- IPv6
ipFamilyPolicy: PreferDualStack
ports:
- nodePort: 30080
port: 45000
selector:
app: api
type: NodePort
Query:
Deploying the above service file and deployment which runs a HTTPS server that accepts both IPv4 and IPv6 input, I see that the NodePort is open with the netstat command.
sudo netstat -tunlp | grep 30080
tcp 0 0 0.0.0.0:30080 0.0.0.0:* LISTEN 171802/kube-proxy
tcp6 0 0 :::30080 :::* LISTEN 171802/kube-proxy
When I try to run a curl request on with IPv6 host IP I get a connection refused error. But curl request via IPv4 goes through.
Any suggestion on why the connection is refused with IPv6?
Thanks,
Shiva