Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
432 views
in Technique[技术] by (71.8m points)

kubernetes - why pods created by the Deployment running on NotReady node all the time

I have three nodes. when I shutdown cdh-k8s-3.novalocal ,pods running on it all the time

# kubectl get node
NAME                  STATUS     ROLES                  AGE   VERSION
cdh-k8s-1.novalocal   Ready      control-plane,master   15d   v1.20.0
cdh-k8s-2.novalocal   Ready      <none>                 9d    v1.20.0
cdh-k8s-3.novalocal   NotReady   <none>                 9d    v1.20.0
# kubectl get pod -o wide
NAME                                READY   STATUS    RESTARTS   AGE     IP              NODE                  NOMINATED NODE   READINESS GATES
nginx-deployment-66b6c48dd5-5jtqv   1/1     Running   0          3h28m   10.244.26.110   cdh-k8s-3.novalocal   <none>           <none>
nginx-deployment-66b6c48dd5-fntn4   1/1     Running   0          3h28m   10.244.26.108   cdh-k8s-3.novalocal   <none>           <none>
nginx-deployment-66b6c48dd5-vz7hr   1/1     Running   0          3h28m   10.244.26.109   cdh-k8s-3.novalocal   <none>           <none>

my yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
# kubectl get deployment
NAME               READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deployment   0/3     3            0           3h28m

I find the Doc

DaemonSet pods are created with NoExecute tolerations for the following taints with no tolerationSeconds:

node.kubernetes.io/unreachable
node.kubernetes.io/not-ready
This ensures that DaemonSet pods are never evicted due to these problems.

But it is DaemonSet and not Deployment

question from:https://stackoverflow.com/questions/65951676/why-pods-created-by-the-deployment-running-on-notready-node-all-the-time

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...