首页 > 其他分享 >Installing Metrics Server on Kubernetes-1.25.2

Installing Metrics Server on Kubernetes-1.25.2

时间:2022-10-25 14:48:33浏览次数:87  
标签:opt metrics kubernetes ca Installing server Metrics pki 1.25

一、Installing Metrics Server on Kubernetes-1.25.2

链接:https://github.com/kubernetes-sigs/metrics-server

在新版的Kubernetes中系统资源的采集均使用Metrics-Server,可以通过Metrics采集节点和Pod的内存、磁盘、CPU和网络的使用率。

1 wget 下载

cd /opt/kubernetes/addons
wget https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.1/components.yaml

2 增加内容

vim /opt/kubernetes/addons/components.yaml

- --kubelet-insecure-tls
- --requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.pem
- --requestheader-username-headers=X-Remote-User
- --requestheader-group-headers=X-Remote-Group
- --requestheader-extra-headers-prefix=X-Remote-Extra- 
image: swr.cn-north-1.myhuaweicloud.com/huaxiayuyi/metrics-server:v0.6.1


- name: ca-ssl
mountPath: /etc/kubernetes/pki

- name: ca-ssl
hostPath:
path: /etc/kubernetes/pki 

3 安装metrics server

kubectl apply -f /opt/kubernetes/addons/components.yaml

4 查看状态

kubectl top node

 

二、报错

此错误是 node 节点没有此证书

[root@kube-master01 ~]# kubectl logs  metrics-server-ff8979984-l7rmb -n kube-system
Error: unable to create request header authentication config: open /opt/kubernetes/pki/front-proxy-ca.pem: no such file or directory
...
panic: unable to create request header authentication config: open /opt/kubernetes/pki/front-proxy-ca.pem: no such file or directory

goroutine 1 [running]:
main.main()
	/go/src/sigs.k8s.io/metrics-server/cmd/metrics-server/metrics-server.go:37 +0xa5

# 解决
scp /opt/kubernetes/pki/front-proxy-ca.pem [email protected]:/opt/kubernetes/pki/
scp /opt/kubernetes/pki/front-proxy-ca.pem [email protected]:/opt/kubernetes/pki/

 

三、安装 Kubernetes-1.25.2

Kubernetes-1.25 Container Image Download:https://www.cnblogs.com/huaxiayuyi/p/16823613.html

Installing Kubernetes-1.25.2 on CentOS 7.9:https://www.cnblogs.com/huaxiayuyi/p/16816029.html

 

标签:opt,metrics,kubernetes,ca,Installing,server,Metrics,pki,1.25
From: https://www.cnblogs.com/huaxiayuyi/p/16824749.html

相关文章

  • Kubernetes-1.25.2 Relevant Download Page
    一、Kubernetes-1.25.2RelevantDownloadPage1 kubernetes页面链接:https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.25.md#server-bin......
  • Kubernetes 1.25 正式发布,多方面重大突破
    容器默认的镜像仓库从http://k8s.gcr.io迁移到了http://registry.k8s.io,目前两个镜像仓库都是可用的,未来会逐渐迁移到后者。国内用户可以尝试镜像的同步地址http://k8......
  • k8s 安装 metrics-server
     wgethttps://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml [root@k8s-master01k8s]#catcomponents.yamlapiVersion:......
  • You appear to be running an X server; please exit X before installing. For furt
    1.安装nvidia驱动报错:YouappeartoberunninganXserver;pleaseexitXbeforeinstalling. Forfurtherdetails2.原因主要是由于安装远程控制lightgm导致X-se......
  • Installing Gradle
    Chapter 4. InstallingGradle4.1. PrerequisitesGradlerequiresaJavaJDKorJREtobeinstalled,version6orhigher(tocheck,use ​​java-version​​).......
  • Installing glibc-2.30 CentOS 7.9
    一、Installingglibc-2.30CentOS7.9C语言底层运行库,不推荐更改地址https://ftp.gnu.org/gnu/glibcwget下载wgethttps://ftp.gnu.org/gnu/glibc/glibc-2.25.tar......
  • Prometheus监控携带metrics接口的服务
    目录Prometheus监控携带metrics接口的服务一、prometheus监控携带metrics接口的服务的流程:二、通过prometheus监控ETCD1、测试ETCD服务的metrics接口2、通过EndPrints获取......
  • Metricserver
    目录Notesapiserver修改apiserver.yaml部署metric-server拉取镜像下载meric-server.yaml文件部署metricNoteshttps://github.com/kubernetes-sigs/metrics-server/releas......
  • 11.25 配置防盗链 11.26 访问控制Directory 11.27 访问控制FilesMatch
    11.25配置防盗链防盗链的功能可以通过限制referer来实现,不是本机服务器所认识的referer,不允许第三方服务器通过链接引用跳转至本机服务器进行访问。修改虚拟主机配置文......
  • 安装 Metrics server
    安装MetricsserverMetricsServer是Kubernetes内置自动缩放管道的可扩展、高效的容器资源指标来源。MetricsServer从Kubelets收集资源指标,并通过MetricsAPI在K......