k8s监控集群资源利用率

Metrics Server 部署
 
先拉取yaml文件
 
修改yaml文件
containers: - name: metrics-server image: yanxinjiang/metrics-server:v0.3.7 #修改成国内镜像 imagePullPolicy: IfNotPresent args: - --cert-dir=/tmp - --secure-port=4443 - --kubelet-insecure-tls #跳过tls检查 - --kubelet-preferred-address-types=InternalIP #以node ip连接kubelet
 
部署metrics
kubectl apply -f components.yaml
 
验证是否部署成功
kubectl get pods -n kube-system
 
查看metrics是否注册到APIservice
kubectl get apiservice
 
查看节点资源使用率
kubectl top node
 
查看pod资源使用率
kubectl top pod -A
posted @   opscool  阅读(96)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
点击右上角即可分享
微信分享提示