Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant: services do not expose ports as expected #99

Closed
fkautz opened this issue Mar 9, 2017 · 3 comments
Closed

vagrant: services do not expose ports as expected #99

fkautz opened this issue Mar 9, 2017 · 3 comments

Comments

@fkautz
Copy link

fkautz commented Mar 9, 2017

Using the vagrant environment, I ran through the k8s startup tutorial to test the basic functionality and ran into a few problems around connectivity.

$ vagrant up

[truncate deployment/kubernetes-bootcamp creation]

# starts, but never replies to queries
$ kubectl proxy

# starts a service, but doesn't route packets to the pods
$ kubectl expose deployment/kubernetes-bootcamp --type="NodePort" --port 8080
$ kubectl get services
NAME                  CLUSTER-IP        EXTERNAL-IP   PORT(S)          AGE       SELECTOR
kubernetes-bootcamp   192.168.200.103   <nodes>       8080:32035/TCP   16m       run=kubernetes-bootcamp
$ curl k8smaster:8080 # never responds

# After scaling to 4 pods:
kubectl get pods -o wide
NAME                                  READY     STATUS    RESTARTS   AGE       IP            NODE
kubernetes-bootcamp-390780338-cv6m0   1/1       Running   0          12m       192.168.3.4   k8sminion2
kubernetes-bootcamp-390780338-nss00   1/1       Running   0          12m       192.168.3.3   k8sminion2
kubernetes-bootcamp-390780338-qbm3v   1/1       Running   0          12m       192.168.2.4   k8sminion1
kubernetes-bootcamp-390780338-zxj0s   1/1       Running   0          21m       192.168.2.3   k8sminion1
$ kubectl exec -it kubernetes-bootcamp-390780338-qbm3v /bin/bash
$> curl 192.168.2.4:8080 # self
Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-390780338-qbm3v | v=1
$> curl 192.168.2.3:8080 # pod on same node
Hello Kubernetes bootcamp! | Running on: kubernetes-bootcamp-390780338-zxj0s | v=1
$> curl 192.168.3.4:8080 # pod on other node, fails
^C
@shettyg
Copy link
Collaborator

shettyg commented Mar 9, 2017

@fkautz Can you please confirm whether the NodePort got created fine when you followed the instructions in the vagrant/README.md? i.e there is an example of apache and nginx. Did the curl $IP:Nodeport get you apache and nginx outputs?

$ curl k8smaster:8080 # never responds

Does the above work when you try it from outside the host?

@shettyg
Copy link
Collaborator

shettyg commented Mar 10, 2017

The tip of OVS master is currently broken. I will try this after it gets fixed.

@shettyg
Copy link
Collaborator

shettyg commented Mar 16, 2017

The tip of the OVS master is fixed. It should work now.

@shettyg shettyg closed this as completed Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants