ingress-service-pods

1、列出pods 

kubectl get po -n kube-system

输出:

NAME                                     READY   STATUS             RESTARTS   AGE

traefik-ingress-5488dc6fb4-z79x5         0/1     CrashLoopBackOff   29         127m

2、查看pod的描述

kubectl describe po traefik-ingress -n kube-system

输出:

Events:
  Type     Reason   Age                     From                     Message
  ----     ------   ----                    ----                     -------
  Normal   Pulling  27m (x25 over 127m)     kubelet, docker-desktop  Pulling image "traefik"
  Warning  BackOff  2m21s (x569 over 127m)  kubelet, docker-desktop  Back-off restarting failed container

 

kubectl get po traefik-ingress-5488dc6fb4-z79x5  -n kube-system -o yaml

3、查看log

kubectl logs  traefik-ingress-5488dc6fb4-z79x5 -n kube-system

输出:

command traefik error: failed to decode configuration from flags: field not found, node: kubernetes

 

进入容器

kubectl exec -it moose-7d4486c4fc-9fgb5 -- /bin/sh

 

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐