日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

k8s pod 状态 Evicted[通俗易懂]

發布時間:2023/12/15 综合教程 29 生活家
生活随笔 收集整理的這篇文章主要介紹了 k8s pod 状态 Evicted[通俗易懂] 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

刪除 Evicted 狀態的pod

[root@hadoop03 kubernetes]# kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
pod "glusterfs-2p28b" deleted

[root@hadoop03 kubernetes]# kubectl describe pod glusterfs-cpft7
Name:           glusterfs-cpft7
Namespace:      default
Priority:       0
Node:           hadoop01/
Start Time:     Tue, 11 Jan 2022 16:32:20 +0800
Labels:         controller-revision-hash=74d67c47f7
glusterfs-node=daemonset
pod-template-generation=1
Annotations:    <none>
Status:         Failed
Reason:         Evicted
Message:        Pod The node had condition: [DiskPressure].
IP:
IPs:            <none>
Controlled By:  DaemonSet/glusterfs
Containers:
glusterfs:
Image:        hadoop03:5000/gluster-centos:gluster3u12_centos7
Port:         <none>
Host Port:    <none>
Liveness:     exec [/bin/bash -c systemctl status glusterd.service] delay=60s timeout=3s period=10s #success=1 #failure=3
Readiness:    exec [/bin/bash -c systemctl status glusterd.service] delay=60s timeout=3s period=10s #success=1 #failure=3
Environment:  <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-ckvvw (ro)
Volumes:
kube-api-access-ckvvw:
Type:                    Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds:  3607
ConfigMapName:           kube-root-ca.crt
ConfigMapOptional:       <nil>
DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              storagenode=glusterfs
Tolerations:                 node.kubernetes.io/disk-pressure:NoSchedule op=Exists
node.kubernetes.io/memory-pressure:NoSchedule op=Exists
node.kubernetes.io/network-unavailable:NoSchedule op=Exists
node.kubernetes.io/not-ready:NoExecute op=Exists
node.kubernetes.io/pid-pressure:NoSchedule op=Exists
node.kubernetes.io/unreachable:NoExecute op=Exists
node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events:
Type     Reason     Age    From               Message
----     ------     ----   ----               -------
Normal   Scheduled  2m56s  default-scheduler  Successfully assigned default/glusterfs-cpft7 to hadoop01
Warning  Evicted    2m56s  kubelet            The node had condition: [DiskPressure].
[root@hadoop03 kubernetes]#


–eviction-hard=nodefs.available<10%

[root@hadoop03 kubernetes]# cat /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf
# Note: This dropin only works with kubeadm and kubelet v1.11+
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --eviction-hard=nodefs.available<10%"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
EnvironmentFile=-/etc/sysconfig/kubelet
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS

原因:資源不足時導致的驅趕

參考:https://www.jianshu.com/p/29bebed74eda
https://www.cnblogs.com/ainimore/p/12757867.html

總結

以上是生活随笔為你收集整理的k8s pod 状态 Evicted[通俗易懂]的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。