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 run your own DaemonSet

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

In this issue, Xiaobian will bring you about how to run your own DaemonSet. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.

Take Prometheus Node Exporter as an example to demonstrate how to run your own DaemonSet.

Prometheus is a popular system monitoring scheme, and Node Exporter is an agent of Prometheus, running as a Daemon on each monitored node.

If you run the Node Exporter container directly in Docker, the command is:

docker run -d \ -v "/proc:/host/proc" \ -v "/sys:/host/sys" \ -v "/:/rootfs" \ --net=host \ prom/node-exporter \ --path.procfs /host/proc \ --path.sysfs /host/sys \ --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)"

Convert it to the YAML profile node_exporter.yml for DaemonSet:

① Direct use of host network.

② Set the container startup command.

③ Mapping Host paths/proc,/sys and/to containers via Volume. We will discuss Volume in detail later.

Execute kubectl apply -f node_exporter.yml:

DaemonSet node-exporter-daemonset deployment successful, k8s-node1 and k8s-node2 run a node exporter pod

The above is how to run your own DaemonSet shared by Xiaobian. If you happen to have similar doubts, you may wish to refer to the above analysis for understanding. If you want to know more about it, please pay attention to 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