proxy - Unable to request kubernetes service -
since 3 days faced strange behavior in kubernetes cluster when requesting mounted services. first of newbie kubernetes. tried install kubernetes cluster (one master 10.104.25.85 , 2 nodes 10.104.25.86 , 10.104.25.87) using ansible on centos 7. inspired playbooks official kubernetes github repository (https://github.com/kubernetes/contrib/tree/master/ansible).
after that, tried run different steps in document http://kubernetes.io/docs/user-guide/connecting-applications/ cluster, when come requesting service curl master follow:
curl cluster_ip:port
the prompts hangs few seconds , finishes showing next message:
connection timed out
failed connect :; connection timed out closing connection 0
curl: (7) failed connect cluster_ip:port connection timed out
i tried follow next article http://kubernetes.io/docs/user-guide/debugging-services/ nothing seems strange.
i can ping pod ip (12.16.23.2 affected flannel) master host. in each host of cluster, can make "curl ip_pod:port" after adding next rule filrewalld (already exists on ansible roles):
firewall-cmd --permanent --direct --add-rule ipv4 filter forward 1 -o docker0 -j accept -m comment --comment "docker subnet"
only node pod deployed, curl : works perfectly.
the next added rules kube-proxy iptables after creating service.
-a kube-sep-pkku2gkbnwf37j43 -s 12.16.23.2/32 -m comment --comment "default/my-nginx:" -j kube-mark-masq
-a kube-sep-pkku2gkbnwf37j43 -p tcp -m comment --comment "default/my-nginx:" -m tcp -j dnat --to-destination 12.16.23.2:80
-a kube-services -d 10.254.11.93/32 -p tcp -m comment --comment "default/my-nginx: cluster ip" -m tcp --dport 80 -j kube-svc-bepxdjbuhfcsyic3
-a kube-svc-bepxdjbuhfcsyic3 -m comment --comment "default/my-nginx:" -j kube-sep-pkku2gkbnwf37j43
ps: my-nginx: service name
80: port
10.254.11.93: service ip.
so doing wrong ??
kubernetes-master (kubectl, apiserver, scheduler,controller): 1.2.0 kubernetes-nodes (kubelet, kube-proxy): 1.2.4 environment:
kubernetes cluster (1 master , 2 minions centos based) centos 7.1 ansible 2.1.1.0:
Comments
Post a Comment