Even though there is an accepted answer, my situation is little different. After connecting to the jumphost with ssh, I have tried the above port forwarding command and it was working fine but for some reason I can't access these exposed port using step 2 from my local machine.
Here is what I did. Added --address 0.0.0.0 to the existing port forward command.
- Inside the Jumphost
kubectl port-forward podname --address 0.0.0.0 7000:8080 -n namespace
- From my local machine, created a tunnel because I can't access our jumphost with user@jumphostname. So I have to use the resource id to specify the jumphost id, so I followed this command.
az network bastion tunnel --name hubname --resource-group
resourcegroupname --subscription subscriptionid --target-resource-id
vmresourceid --resource-port 7000 --port 8000
From local machine you can start using via postman or browser with http://localhost:8000
It might be useful to someone. :)