1 year ago
#334569
tiger_groove
curl request to cluster node port hangs on initializing NSS with certpath
I am attempting to make a local request to the kubernetes cluster that is hosted on my server, the cluster's NodePort is listening at the following address 172.20.120.1:30280
. External client in production are required to make requests to 172.20.0.1:8000
(this cannot change), so I am attempting to add a DNAT rule to nat the traffic from:
172.20.0.1:8000 -> 172.20.120.1:30280 (k8s NodePort)
I am able to make curl request to 172.20.120.1:30280
directly and get a successful response back. However, when I make a curl request to 172.20.0.1:8000
it just hangs with the following message:
# curl -vvvk https://172.20.0.1:8000/v1/my-api
* About to connect() to 172.20.0.1 port 8000 (#0)
* Trying 172.20.0.1...
* Connected to 172.20.0.1 (172.20.0.1) port 8000 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
And then it eventually times out with the following error:
...
* NSS error -5961 (PR_CONNECT_RESET_ERROR)
* TCP connection reset by peer
* Closing connection 0
curl: (35) TCP connection reset by peer
When I make a request directly to 172.20.120.1:30280
I don't get that cert error and it works. I get a successful response back.
Does anyone know why I am getting that cert error?
kubernetes
curl
iptables
calico
0 Answers
Your Answer