12、Kubernetes创建服务status为ErrImagePull?
Kubernetes日常故障处理(二)
排查思路:
kubectl describe pod test-nginx
12、Kubernetes创建服务status为ErrImagePull?
排查思路:
kubectl describe pod test-nginx
原因分析:拉取镜像名称问题。
解决方法:删除错误Pod;重新拉取镜像。
kubectl delete pod test-nginx;kubectl run test-nginx --image=10.0.0.81:5000/nginx:alpine
13、不能进入指定容器内部?
原因分析:yml文件comtainers字段重复,导致该Pod没有该容器。
解决方法:去掉yml文件中多余的containers字段,重新生成Pod。
14、创建PV失败?
原因分析:PV的name字段重复。
解决方法:修改PV的name字段即可。
15、Pod无法挂载PVC?
原因分析:Pod无法挂载PVC。
AccessModes与可使用的PV不一致,导致无法挂载PVC,由于只能挂载大于1G且AccessModes为RWO的PV,故只能成功创建1个Pod,第2个Pod一致pending,按序创建时则第3个Pod一直未被创建。
解决方法:修改yml文件中AccessModes或PV的AccessModes即可。
16、问题:Pod使用PV后,无法访问其内容?
原因分析:NFS卷中没有文件或权限不对。
解决方法:在NFS卷中创建文件并授予权限。
17、查看节点状态失败?
Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)
原因分析:没有Heapster服务。
解决方法:安装Prometheus监控组件即可。
18、Pod一直处于pending状态?
原因分析:由于已使用同样镜像发布了Pod,导致无节点可调度。
解决方法:删除所有Pod后部署Pod即可。
19、Helm安装组件失败?
[root@k8s-master01 hello-world]# helm install
Error: This command needs 1 argument: chart nam
[root@k8s-master01 hello-world]# helm install ./
Error: no Chart.yaml exists in directory "/root/hello-world"
原因分析:文件名格式不对。
解决方法:mv chart.yaml Chart.yaml
原文链接:https://www.cnblogs.com/chalon/p/14415252.html
原文链接:Kubernetes日常故障处理(二),转载请注明来源!