paint-brush
Kubernetes 101 DaemonSets #5by@garciaj.uk
2,650 reads
2,650 reads

Kubernetes 101 DaemonSets #5

by Short Tech StoriesJune 13th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Hello all&nbsp;, So today we will take a little look at daemonsets(<strong>DS</strong>) in Kubernetes, the idea behind <strong>DS</strong> is to ensure that all nodes (or some, depending on the selector) are running a copy of a given pod.

Company Mentioned

Mention Thumbnail
featured image - Kubernetes 101 DaemonSets #5
Short Tech Stories HackerNoon profile picture

Hello all , So today we will take a little look at daemonsets(DS) in Kubernetes, the idea behind DS is to ensure that all nodes (or some, depending on the selector) are running a copy of a given pod.

A good question would be when to use these , and the documentation refer to things that you might want to run forcefully and all nodes:

  • Log Aggregation and collection
  • Storage Clusters
  • Monitoring

They’re described in yaml files like:

I’m using nginx as an image just to keep it simple , so let’s create it :)

So all looking good , the question is why we get nothing current or ready?

Daemonsets operate on selectors “app=logging-node” that means that for this pod (through a DS) to land copy of pods in nodes, there’s got to be a label in the node to match with the selector of the DS.

So let’s add or replace the label

kubectl label node minikube app=logging-node --overwrite

So there it is , a copy of the pod has landed in the node whose label matches the node selector , simple stuff right?

You could update images on the running DS for example with:

kubectl set image ds/logging webserver=nginx-1.2.3.4

Pretty cool stuff.

Next time let’s try to look into how to autoscale pods depending on various metrics? Hopefully i can make it work in minikube!

Thanks guys for all the reads and followings!