控制器DaemonSet
跳到导航
跳到搜索
start
root@ubuntu-200470-1:~/daemonset# cat daemon.yaml apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd namespace: logging labels: app: fluentd-logging spec: selector: matchLabels: name: fluentd template: metadata: labels: name: fluentd spec: containers: - name: fluentd-elasticsearch image: quay.io/fluentd_elasticsearch/fluentd:v4.5.2 resources: limits: memory: 200Mi requests: cpu: 100m memory: 200Mi volumeMounts: - name: varlog mountPath: /var/log terminationGracePeriodSeconds: 30 volumes: - name: varlog hostPath: path: /var/log kubectl create ns logging kubectl apply -f daemon.yam kubectl get daemonset -n logging NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE fluentd 2 2 2 2 2 <none> 9m3s
references
https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
Kubernetes Daemonset: A Comprehensive Guide
https://github.com/monotek/fluentd-elasticsearch
https://quay.io/repository/fluentd_elasticsearch/fluentd?tab=tags