“控制器DaemonSet”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
(创建页面,内容为“== =references= https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/”)
 
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
==
+
=start=
 +
<pre>
 +
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
 +
 
 +
 
 +
</pre>
  
 
=references=
 
=references=
 
https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
 
https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
 +
 +
[https://devopscube.com/kubernetes-daemonset/ Kubernetes Daemonset: A Comprehensive Guide]
 +
 +
https://github.com/monotek/fluentd-elasticsearch
 +
 +
https://quay.io/repository/fluentd_elasticsearch/fluentd?tab=tags
 +
 +
[[category:k8s]]

2023年10月6日 (五) 03:14的最新版本

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