I have installed minikube on remote host. I have created a service like this:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-svc NodePort 10.108.103.37 <none> 8080:30985/TCP 2h
I have pods like this:
kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-pod 1/1 Running 0 23h
web-rs-7zjpx 1/1 Running 0 4h
web-rs-dxrx5 1/1 Running 0 5h
web-rs-jjw6x 1/1 Running 0 5h
web-rs-p8cft 1/1 Running 0 5h
web-rs-wt6vp 1/1 Running 0 5h
minikube service hello-svc --url
How I will be able to access the service at port 30985 from my local machine ? I tried using port forwarding from my localhost through ssh but it didn't worked.
ssh -L 9000:192.168.XX.YY:30985 user@192.168.XX.YY
It needed port forwarding on remote m/c.