From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Lesson 6 lab solution: Running a DaemonSet

Lesson 6 lab solution: Running a DaemonSet - Kubernetes Tutorial

From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Lesson 6 lab solution: Running a DaemonSet

- Okay, creating a DaemonSet, that's not hard. Let's use kubectl create daemon. No, deploy nginxdaemon - -image is nginx - -dry-run is client - o yaml greater than lab6.yaml. And then I'm going to edit lab6.yaml. So what do we need? Well, we need to change the kind to make that DaemonSet. Then we don't need replicas because DaemonSets don't have replicas. We don't need strategy because DaemonSets do not have an update strategy. And everything else can just stay. So next I'm using kubectl apply -f on lab6.yaml and kubectl get ds, which is short for DaemonSet. And as you can see, it's working. You really want to verify that the Pods are running on all the worker nodes. Okay, kubectl get pods -o wide, which is showing that the nginxdaemons, there's one on worker one and there's another one on worker two. That's all. I told you, this is easy.

Contents