k8s run DaemonSet controller management pod (8)

Introduced in front of k8s of deployment and statefulset two controllers.
deployment is part of a stateless service, nginx, Tomcat, no associated POD
statefulset belongs stateful service. mysql, zk, etcd, form a cluster of pod


Here we introduce a third way DaemonSet this controller mode
typical application scenarios DaemonSet of:
running Daemon stored on each node of the cluster, such as: glusterd or ceph.
Run the log collect Daemon on each node, such as: flunentd or logstash.
On each node operation monitoring Daemon, such as: Prometheus Node Exporter or collectd.


Deployment of the difference DaemonSet
copy Pod Deployment deployment will be distributed among the Node, each Node may run several copies.
The difference is that DaemonSet: can only run one copy on each Node.


Summary: DaemonSet this way the controller, each node is mainly used to assign a node node above the average of the pod, such as monitoring agent running in each node above node, or a log collecting agent. . .

-------------------------------------------------- --------------------------------,
followed by the deployment of a
CAT daemonset.yaml
kind: DaemonSet
apiVersion: Extensions / v1beta1
the Metadata :
name: nginx-ds
Labels:
K8S-App: nginx
spec:
Template:
the Metadata:
Labels:
K8S-App: nginx
spec:
Containers:

  • image: nginx:1.7.9
    name: nginx
    ports:
    • name: http
      containerPort: 80
      k8s run DaemonSet controller management pod (8)

What if we modify the deployment in test

Note that you do not specify the number of copies Ha

k8s run DaemonSet controller management pod (8)
See, here is a start up. DaemonSet this is quite simple

Today to explain on here, welcome to the private letter message

Guess you like

Origin blog.51cto.com/xiaorenwutest/2483049