• k8s之常见问题汇总 X


    1.服务器中的k8s已经被移除,但是磁盘依然有占用, 于是将其卸载并删除操作

    [root@k8s-node2 k8s_node]# rm -rf /var/lib/kubelet
    rm: cannot remove ‘/var/lib/kubelet/pods/0552a913-ea4a-4b91-84a7-87ca6d9f8611/volumes/kubernetes.io~secret/etcd-certs’: Device or resource busy
    rm: cannot remove ‘/var/lib/kubelet/pods/0552a913-ea4a-4b91-84a7-87ca6d9f8611/volumes/kubernetes.io~secret/calico-node-token-7jrks’: Device or resource busy
    rm: cannot remove ‘/var/lib/kubelet/pods/ea2b55a3-0891-4965-a64d-2f27b7d29bf6/volumes/kubernetes.io~secret/etcd-certs’: Device or resource busy
    rm: cannot remove ‘/var/lib/kubelet/pods/ea2b55a3-0891-4965-a64d-2f27b7d29bf6/volumes/kubernetes.io~secret/calico-kube-controllers-token-sgpr9’: Device or resource busy
    rm: cannot remove ‘/var/lib/kubelet/pods/cc699261-f1a5-4c8d-913f-9af943bc4117/volumes/kubernetes.io~secret/coredns-token-rnb5t’: Device or resource busy
    rm: cannot remove ‘/var/lib/kubelet/pods/4533016b-95bf-4376-a3a0-57d8c2b37fc8/volumes/kubernetes.io~secret/kubernetes-dashboard-token-nzqr8’: Device or resource busy
    rm: cannot remove ‘/var/lib/kubelet/pods/2b1e0ff1-23e7-412a-a1f3-a6b6d8c5c991/volumes/kubernetes.io~secret/kubernetes-dashboard-certs’: Device or resource busy
    rm: cannot remove ‘/var/lib/kubelet/pods/2b1e0ff1-23e7-412a-a1f3-a6b6d8c5c991/volumes/kubernetes.io~secret/kubernetes-dashboard-token-nzqr8’: Device or resource busy

    查看挂载情况:

    df -HT|grep '/var/lib/kubelet/pods'
    
    tmpfs                   tmpfs     1.5G     0  1.5G   0% /var/lib/kubelet/pods/0552a913-ea4a-4b91-84a7-87ca6d9f8611/volumes/kubernetes.io~secret/etcd-certs
    tmpfs                   tmpfs     1.5G   13k  1.5G   1% /var/lib/kubelet/pods/0552a913-ea4a-4b91-84a7-87ca6d9f8611/volumes/kubernetes.io~secret/calico-node-token-7jrks
    tmpfs                   tmpfs     1.5G   13k  1.5G   1% /var/lib/kubelet/pods/cc699261-f1a5-4c8d-913f-9af943bc4117/volumes/kubernetes.io~secret/coredns-token-rnb5t
    tmpfs                   tmpfs     1.5G   13k  1.5G   1% /var/lib/kubelet/pods/ea2b55a3-0891-4965-a64d-2f27b7d29bf6/volumes/kubernetes.io~secret/etcd-certs
    tmpfs                   tmpfs     1.5G   13k  1.5G   1% /var/lib/kubelet/pods/ea2b55a3-0891-4965-a64d-2f27b7d29bf6/volumes/kubernetes.io~secret/calico-kube-controllers-token-sgpr9
    tmpfs                   tmpfs     1.5G     0  1.5G   0% /var/lib/kubelet/pods/2b1e0ff1-23e7-412a-a1f3-a6b6d8c5c991/volumes/kubernetes.io~secret/kubernetes-dashboard-certs
    tmpfs                   tmpfs     1.5G   13k  1.5G   1% /var/lib/kubelet/pods/2b1e0ff1-23e7-412a-a1f3-a6b6d8c5c991/volumes/kubernetes.io~secret/kubernetes-dashboard-token-nzqr8

    umount这些挂在,然后再删除

    umount $(df -HT | grep '/var/lib/kubelet/pods' | awk '{print $7}')
  • 相关阅读:
    Markdown示例
    初识Markdown
    Ubuntu源整理
    Vi编辑器入门
    Ubuntu,Linux入门系统
    [其他]volatile 关键字
    Qt5:随窗口大小变化背景图片自动缩放的实现
    Qt5:不规则按钮的实现---通过贴图实现
    windows编程:创建DLL
    [转]Firefox拦截12306订票网站的解决办法
  • 原文地址:https://www.cnblogs.com/xingxia/p/k8s_problems.html
Copyright © 2020-2023  润新知