都是k8s版本升级了,导致的这些莫名其妙的错误:
在metrics-server-deployment.yaml文件中containers字段下添加如下
command:- /metrics-server- --kubelet-insecure-tls- --kubelet-preferred-address-types=InternalIP
请问一下,我安装metrics-server插件以后,它一直在CrashLoopBackOff,就是不断的崩溃循环后退,但是kubectl top nodes的时候可以使用,但是kubectl top pods 的时候就会提示我
W0622 11:33:01.536414 98793 top_pod.go:259] Metrics not available for pod default/my-nginx-86555897f9-8hjsq, age: 19h39m20.536335167s
error: Metrics not available for pod default/my-nginx-86555897f9-8hjsq, age: 19h39m20.536335167s
然后通过dashboard插件查看metrics-server的日志的时候提示我
Could not create the API server: cluster doesn't provide requestheader-client-ca-file
这两个问题怎么解决呀
估计有些组件没起来,你看看组件的状态:
# 【管理节点】状态判断
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler flanneld; do
echo ">>>>>>> $SERVICES"
systemctl status $SERVICES
sleep 1;
done
# 【节点】状态
for SERVICES in docker kubelet kube-proxy flanneld; do
echo $SERVICES
systemctl status $SERVICES | grep Active
sleep 1;
done