The demon set ensures that one copy of the pod is always present in all nodes in the cluster.

1.1 Sample of YAM

daemon-set-definition.yaml

apiVersion:apps/v1

kind: DaemonSet

metadata:

name: monitoring-daemon

spec:

selector:

matchLabels:

app: monitoring-agent

template:

metadata:

labels:

app: monitoring-agent

spec:

containers:

- name: monitoring-agent

image: monitoring-agent

1.2 Kubectl

Create

kubectl create -f daemon-set-definition.yaml

List daemon sets

kubectl get daemonsets

Show details

kubectl describe daemonsets monitoring-daemon

Tags:
Created by Bin Chen on 2020/09/04 04:05
    

Need help?

If you need help with XWiki you can contact:

京ICP备19054609号-1

京公网安备 11010502039855号