0

I get "Connection reset by peer" every time I try to use proxy from the Kubernetes pod.

Here is the log when from the curl:

>>>> curl -x http://5.188.62.223:15624 -L http://google.com -vvv

*   Trying 5.188.62.223:15624...
* Connected to 5.188.62.223 (5.188.62.223) port 15624 (#0)
> GET http://google.com/ HTTP/1.1
> Host: google.com
> User-Agent: curl/7.79.1
> Accept: */*
> Proxy-Connection: Keep-Alive
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

Interesting fact, that I have no issues when I use same proxy on local computer, in docker and on remote host. Apparently smith within the cluster doesn't let me communicate with it.

Currently I use Azure hosted Kubernetes. But the same error happens on Digital Ocean as well.

I would be grateful for every leading clue of how I can bypass this restrictions, because Im out of ideas.

Server Info:

{
Major:"1", 
Minor:"20", 
GitVersion:"v1.20.7", 
GitCommit:"ca90e422dfe1e209df2a7b07f3d75b92910432b5",
GitTreeState:"clean", 
BuildDate:"2021-10-09T04:59:48Z", 
GoVersion:"go1.15.12", Compiler:"gc", 
Platform:"linux/amd64"
}

The yaml file I use in order to start the pod is just super basic. But originally I use airflow with Kubernetes executor, which actually spawn pretty similar basic pods:

apiVersion: v1
kind: Pod
metadata:
  name: scrapeevent.test
spec:
  affinity: {}
  containers:
  - command:
    - /bin/sh
    - -ec
    - while :; do echo '.'; sleep 5 ; done
    image: jaklimoff/mooncrops-opensea:latest
    imagePullPolicy: Always
    name: base
  restartPolicy: Never

Jack Klimov
  • 378
  • 2
  • 10
  • Which version of Kubernetes did you use and how did you set up your cluster? Could you, please, provide your yaml? – kkopczak Nov 02 '21 at 08:54
  • Thanks for the comment @kkopczak ! I have added pod manifest file, but it is actually super basic. And The Kubernetes version is 1.20.7 – Jack Klimov Nov 05 '21 at 09:41
  • Is everything ok with the pods/containers (e.g. `kubectl get pods -o wide `)? Could you also check the logs of your pod (e.g. `kubectl logs my-pod`)? – kkopczak Nov 15 '21 at 18:28

0 Answers0