0

I would like to know if port-forward blocks other requests to the pod like redis, mongo, etc.

If I use kubectl port-foward command with mongo port for example, the mongo server will not receive the data ?

suren
  • 7,817
  • 1
  • 30
  • 51
BruceOverflow
  • 556
  • 9
  • 25

1 Answers1

2

As per your comment, kubectl port-forward does not block any exposed traffic to the target pod. So adding portforward won't affect others.

What portforward does is simply making a specific request to the API server. (see doc)

Going further, I don't think port-forward makes pod more "dangerous" (vulnerable against security), however it is generally used for debugging to scope into the pod, not to expose a service in the pod. Use Nodeport service for production. Plus, port-forward has default timeout setting in kubelet.

dropyourcoffee
  • 318
  • 1
  • 5
  • 13