在minikube中,如何使用nodeport公开服务?
例如,我使用以下命令启动kubernetes集群,并创建并公开如下所示的端口:
$ minikube start
$ kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
$ kubectl expose deployment hello-minikube --type=NodePort
$ curl $(minikube service hello-minikube --url)
CLIENT VALUES:
client_address=192.168.99.1
command=GET
real path=/ ....
Run Code Online (Sandbox Code Playgroud)
现在如何从主机访问公开的服务?我想minikube节点也需要配置为暴露这个端口.