背景
自建K8S集群,版本v1.21.2
安装
wget https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
kubectl apply -f components.yaml
可能问题
- metrics-server pod无法启动,出现日志
unable to fully collect metrics: ... x509: cannot validate certificate for because ... it doesn't contain any IP SANs ...
解决方法:在metrics-server中添加--kubelet-insecure-tls
参数跳过证书校验
vim components.yaml
kind: Deployment
spec:
template:
spec:
containers:
- args:
- --kubelet-insecure-tls
kubectl apply -f components.yaml
网友评论