I am running ghost
inside my minikube cluster via the following commands:
kubectl run ghost --image=ghost:0.9
kubectl expose deployments ghost --port=2368 --type=NodePort
Now, as my server has no frontend, I want to see the service in one of my browsers, preferably via ssh port forwarding.
I saw in a Github issue that once can do an ssh forwarding by executing the below command:
sudo ssh -i ~/.minikube/machines/minikube/id_rsa docker@$(minikube ip) -L 3000:localhost:2368
However, I am unable to find an id_rsa
file in the path. I find only the config.json
file there.
So, is there a way I can generate the id_rsa
, or some other way I can do the ssh port forwarding?
Please check if the ghost image got pulled, by using kubectl get pods
, because I tried with 0.9 and couple of times I got ImagePullBackOff
, kubectl run ghost --image=ghost
works fine every time, but it pulls latest version.
For accessing Ghost from browser I was able to achieve it using:
minikube service ghost Opening Kubernetes service default/ghost in default browser... And indeed it is available under: 'http://192.168.99.100:31187'
If you want to reach it from different machine in the network you will need to play with ingress and ingress controllers. If that was your goal (this is why I asked question, because I was not sure) I can try to assist you with that, but also minikube is not the best solution for that, although it is possible.