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

How to modify kubelet startup parameters

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

Share

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

Editor to share with you how to modify kubelet startup parameters, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

1. View kubelet startup parameters

K8s components are managed through systemctl, so they can be found in / etc/systemd/system

Find the relevant configuration files under

[root@zhdj01 system] # lsbasic.target.wants default.target.wants kubelet.service local-fs.target.wants network-online.target.wants sysinit.target.wantsdefault.target getty.target.wants kubelet.service.d multi-user.target.wants sockets.target.wants system-update.target.wants [root@zhdj01 system] # cat kubelet.service.d/10-kubeadm.conf [Service] Environment= "KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap- Kubelet.conf-kubeconfig=/etc/kubernetes/kubelet.conf "Environment=" KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests-allow-privileged=true "Environment=" KUBELET_NETWORK_ARGS=--network-plugin=cni-cni-conf-dir=/etc/cni/net.d-cni-bin-dir=/opt/cni/bin "Environment=" KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10-cluster-domain=cluster.local "Environment=" KUBELET_AUTHZ_ARGS=--authorization -mode=Webhook-- client-ca-file=/etc/kubernetes/pki/ca.crt "Environment=" KUBELET_CADVISOR_ARGS=--cadvisor-port=0 "Environment=" KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs "Environment=" KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true-- cert-dir=/var/lib/kubelet/pki "ExecStart=ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CGROUP_ARGS $KUBELET_CERTIFICATE_ ARGS $KUBELET_EXTRA_ Args [root @ zhdj01 system] # ps-ef | grep kubeletroot 25323 14 Feb27? 1-11:45:14 / usr/bin/kubelet-- bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf-- kubeconfig=/etc/kubernetes/kubelet.conf-- pod-manifest-path=/etc/kubernetes/manifests-- allow-privileged=true-- network-plugin=cni-- cni-conf-dir=/etc/cni/net.d-- cni-bin-dir=/opt/cni/bin -cluster-dns=10.96.0.10-- cluster-domain=cluster.local-- authorization-mode=Webhook-- client-ca-file=/etc/kubernetes/pki/ca.crt-- cadvisor-port=0-- cgroup-driver=cgroupfs-- rotate-certificates=true-- cert-dir=/var/lib/kubelet/pki

As you can see, the parameters of the kubelet process are the same as the configuration file.

2. Modify startup parameters [root@zhdj01 system] # vi kubelet.service.d/10-kubeadm.conf [root@zhdj01 system] # systemctl stop kubelet [root@zhdj01 system] # systemctl daemon-reload [root@zhdj01 system] # systemctl start kubelet above are all the contents of the article "how to modify kubelet startup parameters". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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