kubernetes 1.15安装部署metrics-server插件v0.3.6


      正常部署后查看日志有报错   manager.go:111] unable to fully collect metrics: [unable to fully scrape metrics from source kubelet_summary:node1: unable to fetch metrics from Kubelet node1 (node1): Get https://node1:10250/stats/summary?only_cpu_and_memory=true: dial tcp: lookup node1 on 10.96.0.10:53: no such host, unable to fully scrape metrics from source kubelet_summary:node2: unable to fetch metrics from Kubelet node2 (node2): Get https://node2:10250/stats/summary?only_cpu_and_memory=true: dial tcp: lookup node2 on 10.96.0.10:53: no such host, unable to fully scrape metrics from source kubelet_summary:master: unable to fetch metrics from Kubelet master (master): Get https://master:10250/stats/summary?only_cpu_and_memory=true: dial tcp: lookup master on 10.96.0.10:53: no such host]

        默认的deploy文件有坑,需要修改metrics-server-deployment.yaml (添加command红色部分)

 containers:
 31       - name: metrics-server
 32         image: registry.cn-hangzhou.aliyuncs.com/centosos/metrics-server-amd64:v0.3.6
 33         imagePullPolicy: IfNotPresent
 34         args:
 35           - --cert-dir=/tmp
 36           - --secure-port=4443
 37         command:
 38             - /metrics-server
 39             - --kubelet-preferred-address-types=InternalIP
 40             - --kubelet-insecure-tls
 41         ports:
 42         - name: main-port
 43           containerPort: 4443
 44           protocol: TCP
 45         securityContext:
 46           readOnlyRootFilesystem: true
 47           runAsNonRoot: true
 48           runAsUser: 100

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM