[root@node1 Chapter7]# cat 7-4-daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluentd-elasticsearch
namespace: kube-system
labels:
k8s-app: fluentd-logging
spec:
selector:
matchLabels:
name: fluentd-elasticsearch
template:
metadata:
labels:
name: fluentd-elasticsearch
spec:
tolerations:
# this toleration is to have the daemonset runnable on master nodes
# remove it if your masters can't run pods
- key: node-role.kubernetes.io/master
effect: NoSchedule
containers:
- name: fluentd-elasticsearch
image: registry.cn-beijing.a
7-4 DeamonSet后台任务
最新推荐文章于 2024-01-15 16:24:11 发布
这篇博客介绍了如何在Kubernetes集群中使用DaemonSet部署Fluentd-ELK日志收集系统。通过创建一个名为fluentd-elasticsearch的DaemonSet,确保每个节点上都运行一个Fluentd pod来收集日志。博客内容包括DaemonSet的yaml配置、Pod的状态检查以及在容器内执行命令验证日志收集。
摘要由CSDN通过智能技术生成