Reputation: 1538
I have a multi-host vagrant cluster w/ 2 workers as described in the coreos-vagrant tutorial [1].
I can't access my deployed services externally. Currently, I'm trying NodePort
. The services are all basic, non-auth rest APIs. On the service named curly
, its port 6001
[2] should be accessible on 32001
against my cluster [3]. My Deployment & Service configs are shown below.
Cluster & services are up:
$ 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
Attempting to GET http://172.17.4.101:32001/
or GET http://10.0.2.15:32001/
both just hang. 172.17.4.101 is my master. 10.0.2.15 is one of my vagrant worker IPs [4].
Upvotes: 0
Views: 471
Reputation: 1538
< NodeAddress>:< NodePort> worked, however, the label
s in each Deployment
were not unique. there was a common label
in each Deployment, (run: stooges
), but each also needed something else in the label hash. that is, each Deployment
label set must be unique.
the NodeAddress I tried above was also incorrect. kubectl describe pods
gave me the node addrs of where my services were running. therefore, GET 172.17.4.202:32001
responded per expectation
Upvotes: 1