0

I am running kubectl port-forward and sending a request to localhost:8081. I get the following error output:

$ kubectl port-forward svc/pong-service 8081:8090 -n my-namespace
Forwarding from 127.0.0.1:8081 -> 443
Forwarding from [::1]:8081 -> 443
Handling connection for 8081
Handling connection for 8081
E0826 11:31:54.679791  412617 portforward.go:400] an error occurred forwarding 8081 -> 443: error forwarding port 443 to pod 80485aa877fd1279190c5b4fbcb1efab1ccf4c7feb865c7ad3a289aeb8890d0f, uid : exit status 1: 2021/08/26 18:31:54 socat[368856] E connect(5, AF=2 127.0.0.1:443, 16): Connection refused

This answer leads me to believe my request is being forwarded to <some pod>:443 and <some pod> is not listening on port 443.

What is this string in the kubectl error output? 80485aa877fd1279190c5b4fbcb1efab1ccf4c7feb865c7ad3a289aeb8890d0f

Can I use this string to find the name or uid of <some pod>?

1 Answers1

1

Your port forward command is incorrect, change it to:

kubectl port-forward svc/pong-service 8081:443 -n my-namespace

If that was your typo, check with kubectl get ep pong-service -n my-namespace to ensure port 443 is indeed opened.

gohm'c
  • 13,492
  • 1
  • 9
  • 16
  • Thank you for your response. I am looking for the meaning of the "pod #####" part of the error message, rather than solving the specific issue which caused it. Any info you have on how to interpret `kubectl port-forward` output would be appreciated. – Hamomelette Aug 27 '21 at 18:52
  • 1
    This ID seems to be a networking identifier to reach the pod, but it look to be something not traceable (at least not easily) – Hi_Esc Aug 28 '21 at 01:57