kubenetes 报错排查

1. 报 code = Unknown desc = failed to get sandbox ip: check network namespace closed: remove netns: unlinkat /var/run/netns/cni-2502ee8a-9f06-2a44-66c6-59e2a7a277f9: device or resource busy

  • 解决方案: see code = Unknown desc = failed to get sandbox ip: check network namespace closed: remove netns: unlinkat /var/run/netns/cni-2502ee8a-9f06-2a44-66c6-59e2a7a277f9: device or resource busy

参考 https://github.com/TimeBye/kubeadm-ha/issues/85

处理方法:

echo 1 > /proc/sys/fs/may_detach_mounts
或者
sysctl -w fs.may_detach_mounts=1

建议:
部署过程中追加 内核参数: fs.may_detach_mounts=1

2. k3s 移除自带的网关 traefik

# see https://github.com/k3s-io/k3s/issues/1160

    Remove traefik helm chart resource: kubectl -n kube-system delete helmcharts.helm.cattle.io traefik
    Stop the k3s service: sudo service k3s stop
    Edit service file sudo nano /etc/systemd/system/k3s.service and add this line to ExecStart:

    --no-deploy traefik \

    Reload the service file: sudo systemctl daemon-reload
    Remove the manifest file from auto-deploy folder: sudo rm /var/lib/rancher/k3s/server/manifests/traefik.yaml
    Start the k3s service: sudo service k3s start

posted on 2023-11-03 12:45  正义的伙伴!  阅读(275)  评论(0编辑  收藏  举报

导航

//增加一段JS脚本,为目录生成使用