kubernete安装常见问题汇总
1、Sep 15 18:22:07 k8s-node1 kubelet: E0915 18:22:07.628384 12912 summary.go:102] Failed to get system container stats for "/system.slice/kubelet.service": failed to get cgroup stats for "/system.slice/kubelet.service": failed to get container info for "/system.slice/kubelet.service": unknown container "/system.slice/kubelet.service
创新互联长期为1000+客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为鹤庆企业提供专业的网站制作、网站设计,鹤庆网站改版等技术服务。拥有十年丰富建站经验和众多成功案例,为您定制开发。
docker需要重启
2、
[discovery] Failed to request cluster info, will try again: [Get https://192.168.1.112:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate has expired or is not yet valid
单节点加入时区不对,需要ntpupdate 下时间 ntpdate 182.92.12.11
3、
如果kubectl get nodes 有节点状态是not ready 状态,可重启该节点的docker
执行kubectl get nodes 提示如下:
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
解决办法,记的kubeadm reset会删除:
4、
error: open /var/lib/kubelet/config.yaml: no such file or directory
关键文件缺失,多发生于没有做 kubeadm init就运行了systemctl start kubelet
5、
kubeadm init --apiserver-advertise-address=192.168.11.12 --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.13.4 --pod-network-cidr=10.244.0.0/16
kubernete v1.13.4可以指定源进行安装
6、
kubernete v1.13.4 支持docker-ce-18.06.3.ce-3.el7.x86_64
7、
kubectl get pod --all-namespaces -o wide
保证集群进入running 状态后再查看集群状态,否则可能不正常.这需要几分钟
8、
swapoff | #/dev/mapper/centos-swap swap swap defaults 0 0
关闭swap交换分区,交换分区技术现在基本没人用
9、kubeadm 重置命令,kubeadm reset,这个会反复用到
10、
kubectl drain node2 --delete-local-data --force --ignore-daemonsets
kubectl delete node node2
kubeadm join 192.168.11.12:6443 --token vabefc.eilf71g7y96twbyz --discovery-token-ca-cert-hash sha256:4e6f2149e6488be130611ccc92137cdaf7a3c64a919c4454604f9857d51453a7
集群加入节点,删除节点
#k8s问题汇总
https://blog.csdn.net/qq_34857250/article/details/82562514
网站题目:kubernete安装常见问题汇总
网站路径:http://ybzwz.com/article/gjjjos.html