Lab 7.2
Lab 7.2
This extra step of automation can be useful for using with products like ceph where storage is often added or removed, but
perhaps among a subset of hardware. They allow for complex deployments when used with declared resources like memory,
CPU or volumes.
1. We begin by creating a yaml file. In this case the kind would be set to DaemonSet. For ease of use we will copy the
previously created rs.yaml file and make a couple edits. Remove the Replicas: 2 line.
student@lfs458-node-1a0a:˜$ cp rs.yaml ds.yaml
ds.yaml
1 ....
2 kind: DaemonSet
3 ....
4 name: ds-one
5 ....
6 replicas: 2 #<<<----Remove this line
7 ....
8 system: DaemonSetOne #<<-- Edit both references
9 ....
2. Create and verify the newly formed DaemonSet. There should be one Pod per node in the cluster.
student@lfs458-node-1a0a:˜$ kubectl create -f ds.yaml
daemonset.apps/ds-one created
3. Verify the image running inside the Pods. We will use this information in the next section.
student@lfs458-node-1a0a:˜$ kubectl describe pod ds-one-b1dcv | grep Image:
Image: nginx:1.15.1