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

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Lesson 3 lab solution: Running a DaemonSet

Lesson 3 lab solution: Running a DaemonSet

- So what's the easiest way? Well, I would say start with the deployment. Kubectl create deploy. Then it says image nginx. Greater than. Oops, you need a name as well. Deploy daemon, or whatever you want to call it. Dash dash image nginx. Dash dash dry run is client. Minus O. Yaml. And we call it deploy daemon dot yaml. Then in deploy daemon, we are going to change a couple of things. First, the kind, which needs to be a DaemonSet. Then the replicas, which need to go. And the strategy, which also needs to go. And is that all? Yeah, that's all. Kubectl apply minus F deploy daemon dot yaml. And we can use kubectl get all minus minus selector app is deploy daemon to figure out if it's working as expected. Yeah, there we go. It's working as expected. Hey, one little detail. DaemonSet doesn't need a replica set. DaemonSet is controlling the ports directly. Of course it doesn't need a replica set because it runs one port instance on every node in the cluster. You don't need any replica set…

Contents