contiv / contiv.github.io

Contiv website source code
http://contiv.github.io/
Other
3 stars 65 forks source link

Contiv 1.0.1 and 1.0.0 and DNS problems #139

Open overip opened 7 years ago

overip commented 7 years ago

I was trying the tutorial here https://kubernetes.io/docs/tasks/configure-pod-container/declare-network-policy/ and I could not get the DNS to work properly. I don't know if it is a problem of my machine of it is a bug. If I remember correctly the beta version of contiv used to replace the kube-dns with its own DNS, and don't know if that is still the case with the 1.0.0 and 1.0.1

Anyway the following are the commands and their output, which shows that the DSN is not working root@master:/home/andrea# kubectl run nginx --image=nginx --replicas=2 deployment "nginx" created root@master:/home/andrea# kubectl get pods NAME READY STATUS RESTARTS AGE nginx-701339712-12j2l 0/1 ContainerCreating 0 10s nginx-701339712-w8xnj 0/1 ContainerCreating 0 10s vnf1-1793693912-lfm67 1/1 Running 2 1d vnf2-1963301082-kf6dh 1/1 Running 2 1d vnf2-1963301082-sc440 1/1 Running 2 1d root@master:/home/andrea# kubectl get pods NAME READY STATUS RESTARTS AGE nginx-701339712-12j2l 1/1 Running 0 20s nginx-701339712-w8xnj 1/1 Running 0 20s vnf1-1793693912-lfm67 1/1 Running 2 1d vnf2-1963301082-kf6dh 1/1 Running 2 1d vnf2-1963301082-sc440 1/1 Running 2 1d root@master:/home/andrea# kubectl expose deployment nginx --port=80 service "nginx" exposed root@master:/home/andrea# kubectl get svc,pod NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE svc/kubernetes 10.254.0.1 443/TCP 7d svc/nginx 10.254.170.170 80/TCP 9s

NAME READY STATUS RESTARTS AGE po/nginx-701339712-12j2l 1/1 Running 0 33s po/nginx-701339712-w8xnj 1/1 Running 0 33s po/vnf1-1793693912-lfm67 1/1 Running 2 1d po/vnf2-1963301082-kf6dh 1/1 Running 2 1d po/vnf2-1963301082-sc440 1/1 Running 2 1d root@master:/home/andrea# kubectl run busybox --rm -ti --image=busybox /bin/sh Waiting for pod default/busybox-3674381263-fthsn to be running, status is Pending, pod ready: false Waiting for pod default/busybox-3674381263-fthsn to be running, status is Pending, pod ready: false Waiting for pod default/busybox-3674381263-fthsn to be running, status is Pending, pod ready: false Waiting for pod default/busybox-3674381263-fthsn to be running, status is Pending, pod ready: false If you don't see a command prompt, try pressing enter. / # wget --spider --timeout=1 nginx wget: bad address 'nginx' / #

Any suggestions? Thank you so much!

rhim commented 7 years ago

@rchirakk could you please try this scenario and verify the issue?

rchirakk commented 7 years ago

Have you configured a contiv default network ? In which network/epg do you create these pods ?

The example shown above does not use contiv networking.