赞
踩
一般的k8s排错步骤:查看node状态→查看pod状态→查看kubelet系统日志
1、查看各节点状态:kubectl get node <node - name>
2、查看node事件:kubectl describe node <node - name>
3、查看Pod状态:kubectl get pod -o wide
4、查看Pod事件:kubectl describe pod <pod - name>
5、查看Pod日志文件:kubectl logs -f <pod - name>
6、进入pod内部:kubectl exec -it <pod - name> /bin/bash
7、查看系统Kubelet 日志: journalctl -l -u kubelet -n 1000
8、查询副本编辑器:kubectl get rc <pod - name>
9、修改rc环境变量: kubectl edit pod | grep <pod - name>
1、The connection to the server localhost:8080 was refused - did you specify the right host or port?
1. echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile
2. source ~/.bash_profile
2、#failed to read pod IP from plugin/docker: NetworkPlugin cni failed on the status hook for pod “nginx-ingress-controller-7bff4d7c6-n7g62_default”: CNI failed to retrieve network namespace path: cannot find network namespace for the terminated container
重启docker服务
systemctl restart docker
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。