PROBLEM: Cannot access pods in my k8s deployment for testing SOLUTION: Use very simple port-forward method Find your destination Decide what do you want to access. Port forward works on services, pods, deployments or even replicaSets. The syntax is very simple.
|
kubctl port-forward pod-name local-port:destination-port |
Which leads to example like this:
|
kubectl port-forward my-pod-name 1000:3000 |
You can see your app through port 1000 on your local machine (working on the port 3000 on remote). Bear in mind, you are connecting directly to the service/pod/whatever, so use the…
Read More Read More