请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

ingress访问不到对应的pod

[root@k8s-master-01 ingress-nginx]# kubectl get all -n ingress-nginx
NAME                                            READY   STATUS    RESTARTS   AGE
pod/default-http-backend-c858dffd-dcs9x         1/1     Running   0          26s
pod/nginx-ingress-controller-598c6d8987-wznxx   1/1     Running   0          26s


NAME                           TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
service/default-http-backend   ClusterIP   10.254.158.137   <none>        80/TCP    26s


NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/default-http-backend       1/1     1            1           26s
deployment.apps/nginx-ingress-controller   1/1     1            1           26s

NAME                                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/default-http-backend-c858dffd         1         1         1       26s
replicaset.apps/nginx-ingress-controller-598c6d8987   1         1         1       26s
[root@k8s-master-01 ingress-nginx]# kubectl get pod -o wide
NAME                           READY   STATUS    RESTARTS   AGE   IP            NODE            NOMINATED NODE   READINESS GATES
nginx                          1/1     Running   0          43h   128.22.0.3    k8s-worker-02   <none>           <none>
nginx-ds-bmsm9                 1/1     Running   0          43h   128.22.0.2    k8s-worker-02   <none>           <none>
nginx-ds-xz2xg                 1/1     Running   3          43h   128.22.1.11   k8s-worker-01   <none>           <none>
tomcat-demo-7c8ccf9fcd-vgvjd   1/1     Running   0          14s   128.22.1.29   k8s-worker-01   <none>           <none>

配置host后访问报504

[root@k8s-worker-02 harbor]# netstat -ntpl|grep 443
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      24716/nginx: master 
tcp6       0      0 :::443                  :::*                    LISTEN      24716/nginx: master 
[root@k8s-worker-02 harbor]# netstat -ntpl|grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      24716/nginx: master 
tcp        0      0 0.0.0.0:18080           0.0.0.0:*               LISTEN      24716/nginx: master 
tcp6       0      0 :::80                   :::*                    LISTEN      24716/nginx: master 
tcp6       0      0 :::18080                :::*                    LISTEN      24716/nginx: master 

我用最新版的mandatory.yaml访问报503,日志显示已经Type:“ContainerStarted”

求老师教下排查思路

正在回答 回答被采纳积分+3

1回答

提问者 刘莅轩 2019-09-20 15:27:19

ingress与pod是不是得在一个worker节点上,我部署在同一节点就正常了

0 回复 有任何疑惑可以回复我~
  • 恩 那跟ingress没关系了,基本是cni的问题,差一下calico的启动日志,注意开头的部分,是否网桥选错了
    回复 有任何疑惑可以回复我~ 2019-09-21 10:49:05
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信