我有一个多主机流浪群集w/2工作者描述在coreos-vagrant教程[1]。无法访问kubernetes来自NodePort的服务
我无法从外部访问我部署的服务。目前,我正在尝试NodePort
。这些服务都是基本的非身份验证休息API。在名为curly
的服务上,其端口6001
[2]应可通过32001
访问我的群集[3]。我的部署&服务配置如下所示。
集群&服务了:
$ kubectl cluster-info
Kubernetes master is running at https://172.17.4.101:443
...
$ kubectl get services
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.3.0.1 <none> 443/TCP 1d
stooge-curly 10.3.0.254 <nodes> 6001:32001/TCP 15m
stooge-larry 10.3.0.72 <nodes> 6001:32002/TCP 15m
stooge-moe 10.3.0.219 <nodes> 6003:32003/TCP 15m
试图GET http://172.17.4.101:32001/
或GET http://10.0.2.15:32001/
都只有挂。 172.17.4.101是我的主人。 10.0.2.15是我的一个流浪工人IP [4]。
- [1] https://coreos.com/kubernetes/docs/latest/kubernetes-on-vagrant.html
- [2] https://github.com/cdaringe/hackweek-kubes/blob/master/stooges-all.yaml#L10
- [3] https://github.com/cdaringe/hackweek-kubes/blob/master/stooges-all.yaml#L67
- [4] https://gist.github.com/cdaringe/3c0f3459a90afa113c87cec3a24e4b1d