欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

k8s问题记录

程序员文章站 2022-03-12 18:29:28
...

1. kubectl run 起来的pod 用 kubectl delete po删不掉

kubectl delete deployment my-nginx

 

kubelet
# 看到最后一行:error: failed to run Kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "cgroupfs" is different from docker cgroup driver: "systemd"


# vim /lib/systemd/system/docker.service
# 将 --exec-opt native.cgroupdriver=systemd  修改为:
#  --exec-opt native.cgroupdriver=cgroupfs
# systemctl daemon-reload 
# systemctl restart docker.service
# kubelet显示正常

 

 

设置API server接收所有主机的请求:

 

MacBook-Mini:~ test$ kubectl proxy --address='0.0.0.0'  --accept-hosts='^*$'
Starting to serve on [::]:8001