rootsongjc / kubernetes-handbook

Kubernetes中文指南/云原生应用架构实战手册
https://jimmysong.io/book/kubernetes-handbook
Creative Commons Attribution 4.0 International
11.11k stars 2.95k forks source link

nginx部署成功之后,无法访问对应的clusterip #363

Closed anakin closed 4 years ago

anakin commented 5 years ago

环境

版本和配置信息

操作

kubectl get svc -o wide
NAME         TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE     SELECTOR
kubernetes   ClusterIP   10.68.0.1      <none>        443/TCP        3h25m   <none>
nginx-ds     NodePort    10.68.69.248   <none>        80:22351/TCP   96m     app=nginx-ds

kubectl get pods -o wide
NAME             READY   STATUS    RESTARTS   AGE     IP             NODE             NOMINATED NODE   READINESS GATES
nginx            1/1     Running   1          3h23m   10.20.55.67    192.168.32.133   <none>           <none>
nginx-ds-2g2c4   1/1     Running   0          99m     10.20.183.66   192.168.32.132   <none>           <none>
nginx-ds-9s5zq   1/1     Running   0          99m     10.20.55.68    192.168.32.133   <none>           <none>

导致该问题的操作或现象

无法访问10.68.69.248以及10.20.55.68、10.20.55.68

日志

日志或报错信息 curl 10.68.69.248 curl: (7) Failed to connect to 10.68.69.248 port 22351: Connection refused

anakin commented 5 years ago

折腾了两天也没搞定,求大神帮忙~~

rootsongjc commented 5 years ago

请检查 kube-proxy 日志,及确认跨节点的 pod 能否互相ping 通。