当前位置:网站首页>Kubernetes monitoring component metrics server deployment
Kubernetes monitoring component metrics server deployment
2022-07-25 07:27:00 【Brother Xing plays with the clouds】
from v1.8 Start , A measure of resource usage ( Like a container CPU And memory usage ) Can pass Metrics API obtain . Be careful :
- Metrics API Only the current measurement data can be queried , It doesn't save historical data
- Metrics API URI by /apis/metrics.k8s.io/, stay k8s.io/metrics maintain
- Must be deployed metrics-server To use the API,metrics-server By calling Kubelet Summary API get data
Open the aggregation layer (Aggregation Layer)
Some knowledge about the aggregation layer The aggregation layer runs on apiserver Inside the process , Allow users to colony Install additional Kubernetes Style API, Expand core API The function of . The aggregation layer needs to be started apiserver It can only be used when it is turned on .
Before users register extended resources , The aggregation layer does nothing . User to register API, You must add a APIService object , Used to declare API Of URL The path and the backend that handles the request APIService. thereafter , The aggregation layer will send all requests to that path (e.g. /apis/myextension.mycompany.io/v1/…) All forwarded to registered APIService.
In general ,APIService Object to extension-apiserver Running on the colony One of them pod in , If you need to actively manage the added resources ,extension-apiserver Also need to work with one or more controlller Association ,apiserver-builder It provides a framework for both parties .
Service Catalog yes Kubernetes A kind of API Extended implementation , convenient Kubernetes colony Internal application access colony external 、 Managed by a third party 、 Services provided , For example, database services provided by cloud providers .Service Catalog The installation of will provide for the services it provides extension-apiserver and controller Two extension components .
Open the aggregation layer modify apiserver The configuration file , Add the following startup parameters to enable aggregation layer:
--requestheader-client-ca-file=/etc/kubernetes/ssl/ca.pem --requestheader-allowed-names=aggregator --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User
Deploy metrics-server
git clone https://github.com/kubernetes-incubator/metrics-server cd metrics-server kubectl create -f deploy/1.8+/
You can see later metrics-server Run up :
kubectl -n kube-system get pods -l k8s-app=metrics-server
remarks : If gcr.io Can't access the image of metrics-server-deployment.yaml Replace the image in with :daocloud.io/liukuan73/metrics-server-amd64:v0.2.1
Metrics API
Can pass kubectl proxy To visit Metrics API:
- http://127.0.0.1:8001/apis/metrics.k8s.io/v1beta1/nodes
- http://127.0.0.1:8001/apis/metrics.k8s.io/v1beta1/nodes/
- http://127.0.0.1:8001/apis/metrics.k8s.io/v1beta1/pods
- http://127.0.0.1:8001/apis/metrics.k8s.io/v1beta1/namespace//pods/
It can also be directly passed through kubectl Command to access these API, such as :
- kubectl get –raw apis/metrics.k8s.io/v1beta1/nodes
- kubectl get –raw apis/metrics.k8s.io/v1beta1/pods
- kubectl get –raw apis/metrics.k8s.io/v1beta1/nodes/
- kubectl get –raw apis/metrics.k8s.io/v1beta1/namespace//pods/
边栏推荐
- [programmer 2 Civil Servant] I. Basic Knowledge
- First, how about qifujin
- From the era of portal to the era of information flow, good content has been ignored?
- 线代(矩阵‘)
- [semidrive source code analysis] [drive bringup] 38 - norflash & EMMC partition configuration
- Boiling short drama Jianghu: nine of the ten production teams are shooting, with a head sharing fund of more than 30million, and users are addicted to paying routines
- GBase 8a中关于--skip-networking 问题
- Leetcode118. Yanghui triangle
- 关于GBase 自动关闭连接问题
- How to do a good job in safety development?
猜你喜欢

Alibaba cloud image address & Netease cloud image

What if Oracle 19C migration encounters large lob tables?

Have you got the advanced usage of pytest?

北京内推 | 微软STCA招聘NLP/IR/DL方向研究型实习生(可远程)

Day by day, month by month | Shenzhen potential technology released the extreme accelerated version of molecular docking engine uni docking

Openatom xuprechain open source biweekly report | 2022.7.11-2022.7.22

Nailing the latest version, how to clear the login phone number history data

集群聊天服务器:项目问题汇总

A domestic open source redis visualization tool that is super easy to use, with a high-value UI, which is really fragrant!!

Configuring WAPI certificate security policy for Huawei wireless devices
随机推荐
Luo min's backwater battle in qudian
Gan series of confrontation generation network -- Gan principle and small case of handwritten digit generation
Alibaba cloud image address & Netease cloud image
Huawei wireless device configuration wpa2-802.1x-aes security policy
深度学习之快速实现数据集增强的方法
【程序员2公务员】关于体制调研的一些常见问题总结
Boiling short drama Jianghu: nine of the ten production teams are shooting, with a head sharing fund of more than 30million, and users are addicted to paying routines
【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了
Cluster chat server: summary of project problems
Offline base tile, which can be used for cesium loading
Summary of differences between data submission type request payload and form data
MATLAB自编程系列(1)---角分布函数
Wechat applet request requests to carry cookies to verify whether it has logged in
Xinku online | cnopendata shareholder information data of A-share listed companies
J1 common DOS commands (P25)
Wechat applet wx.request interface
[300 + selected interview questions from big companies continued to share] big data operation and maintenance sharp knife interview question column (V)
线代(矩阵‘)
QT6 with vs Code: compiling source code and basic configuration
用VS Code搞Qt6:编译源代码与基本配置