Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation method of kubectl top plug-in

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "kubectl top plug-in installation method", the explanation content in the article is simple and clear, easy to learn and understand, please follow the small series of ideas slowly in-depth, together to study and learn the "kubectl top plug-in installation method" bar!

1. Download yaml document http://pencil-file.oss-cn-hangzhou.aliyuncs.com/blog/auth-delegator.yamlwget http://pencil-file.oss-cn-hangzhou.aliyuncs.com/blog/resource-reader.yaml2 http://pencil-file.oss-cn-hangzhou.aliyuncs.com/blog/aggregated-metrics-reader.yamlwget http://pencil-file.oss-cn-hangzhou.aliyuncs.com/blog/metrics-server-deployment.yamlwget http://pencil-file.oss-cn-hangzhou.aliyuncs.com/blog/metrics-apiservice.yamlwget http://pencil-file.oss-cn-hangzhou.aliyuncs.com/blog/auth-reader.yamlwget http://pencil-file.oss-cn-hangzhou.aliyuncs.com/blog/metrics-server-service.yamlwget Modify metrics-server-deployment.yaml file

Core configuration:

containers: - name: metrics-server image: k8s.gcr.io/metrics-server-amd64:v0.3.2 imagePullPolicy: IfNotPresent #Modified to local with mirror preference command: - /metrics-server - --metric-resolution=30s - --kubelet-insecure-tls - --kubelet-preferred-address-types=InternalIP,Hostname,InternalDNS,ExternalDNS,ExternalIP #Container Presets Script volumeMounts: - name: tmp-dir mountPath: /tmp3. Pull Mirror

docker pull k8s.gcr.io/metrics-server-amd64

Because the mirror is abroad, it may use other ways to proxy the Internet or import locally

proxy Internet access

mkdir -p /etc/systemd/system/docker.service.d#Create a proxy folder, default no echo '[Service]Environment="HTTP_PROXY=192.168.0.26:8118" "HTTPS_PROXY = 192.168.0.26:8118"' >/etc/systemd/system/docker.service.d/http-proxy.conf#Create proxy configuration, provided that there is proxy server systemctl daemon-reload systemctl restart docker#Restart docker

Run the above script and you can pull it to a foreign mirror.

local export import method

Export to the pulled host first

docker save -o metrics-server-amd64:v0.3.2.tar k8s.gcr.io/metrics-server-amd64:v0.3.2

#.tar is the completed packaged file, followed by the image name to be exported. The image name needs to be accompanied by a version name. The image name is viewed in docker images.

import

docker load

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report