Closed wotmshuaisi closed 5 years ago
What steps did you take and what happened: [A clear and concise description of what the bug is.]
i created a service for a pod, and try to ping this pod by service name in another pod, and it can get ip address but, no connection
What did you expect to happen:
pods can access each others by service name
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
> kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES alpine-deployment-b84cffc68-d9p2b 1/1 Running 0 39m 192.168.177.140 xxx.compute.internal <none> <none> nginx-deployment-76bf4969df-72mq8 1/1 Running 0 63m 192.168.130.11 xxx.compute.internal <none> <none> > kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 24h nginx LoadBalancer 10.100.40.20 xxx.elb.amazonaws.com 8080:32208/TCP 53m > kubectl exec -it alpine-deployment-b84cffc68-d9p2b sh > ping nginx PING nginx (10.100.40.20): 56 data bytes ^C --- nginx ping statistics --- 2 packets transmitted, 0 packets received, 100% packet loss > ping 192.168.130.11 PING 192.168.130.11 (192.168.130.11): 56 data bytes 64 bytes from 192.168.130.11: seq=0 ttl=62 time=0.197 ms 64 bytes from 192.168.130.11: seq=1 ttl=62 time=0.201 ms
i have absolutely no idea where does 10.100.40.20 from
10.100.40.20
Environment:
What steps did you take and what happened: [A clear and concise description of what the bug is.]
i created a service for a pod, and try to ping this pod by service name in another pod, and it can get ip address but, no connection
What did you expect to happen:
pods can access each others by service name
Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]
i have absolutely no idea where does
10.100.40.20
fromEnvironment: