On Saturday, May 28, 2016, Qian Zhang <[email protected]> wrote: > Hi, > > I created a Nginx deployment and service in my K8s env which has flannel > as network solution. > *$ kubectl describe deployment * > Name: my-nginx > Namespace: default > CreationTimestamp: Sat, 28 May 2016 17:29:58 +0800 > Labels: run=my-nginx > Selector: run=my-nginx > Replicas: 2 updated | 2 total | 2 available | 0 unavailable > StrategyType: RollingUpdate > MinReadySeconds: 0 > RollingUpdateStrategy: 1 max unavailable, 1 max surge > OldReplicaSets: <none> > NewReplicaSet: my-nginx-994817687 (2/2 replicas created) > No events. > > *$ kubectl describe svc/my-nginx * > Name: my-nginx > Namespace: default > Labels: run=my-nginx > Selector: run=my-nginx > Type: ClusterIP > IP: 172.17.17.222 > Port: <unset> 80/TCP > Endpoints: 10.0.13.2:80,10.0.8.2:80 > Session Affinity: None > No events. > > I can always access the Nginx via service's endpoints (10.0.13.2:80, > 10.0.8.2:80), but sometime can access it via service ClusterIP > (172.17.17.222), but sometime cannot. > *$ curl 172.17.17.222* > <!DOCTYPE html> > ... > <title>Welcome to nginx!</title> > ...</html> > > *$ curl 172.17.17.222 * > curl: (7) Failed to connect to 172.17.17.222 port 80: Connection timed out > > Any ideas on what's wrong in my env? Thanks! >
It can easily be kube-proxy, or flannel. Not sure how the virtual IP is managed on that setup, maybe with iptables rules too. If that is the case, check if they are up to date when it fails, with tcpdump where packets are not being sent, etc. You can also try to use the service with type node port and check again for the above and see if it gives you any hint (like this node does not forward the packets to pods, etc.). It is probably something wrong with the installation, so how did you install? Did you use the kube-up script ? -- You received this message because you are subscribed to the Google Groups "Containers at Google" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-containers. For more options, visit https://groups.google.com/d/optout.
