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