-Okay, so let's go through the lab on DaemonSets.
The first question is how many DaemonSets are created
in the cluster in all namespaces.
Let's do a Kubectl get DaemonSets.
If you look at the default namespace, there are none,
but if you want to look at all namespaces, you do a -A.
We see that there are two DaemonSets in all namespaces.
It's the Kube-flannel-ds and Kube-proxy.
That's two.
The next question is which namespace are the DaemonSets created in.
If you look at the namespace column here, we see that
they are in the Kube-system namespace.
That Kube-system
and which of the below is a DaemonSet.
If you look here, we have the Kube-flannel-ds
and Kube-proxy these are the DaemonSets.
Scheduler, Coredns, ancdmaster. These are not,
it's the Kubes-flannel-ds that's the DaemonSets.
On how many nodes are the pods scheduled by the DaemonSets Kube-proxy.
If you look at Kube-proxy here,
we see the desired and current and ready numbers are one.
It's one.
Let's also look at it in detail.
We go describe DaemonSets Kube-proxy.
The namespace is Kube-system, it means that.
Here you can see the desired number of nodes scheduled is one,
current number of nodes should do this one.
It's just one.
That's also because if you look at this cluster,
there's only one node and that's the reason it's just one.
What is the image used by the pod deployed by the Kube-flannel-ds daemonset?
Let's look at the Kube-flannel-ds a bit more detail.
Describe DaemonSets, Kube-flannel-ds.
Then the next space is Kube-system
and we see that the image is the one under coreOS flannel.
That's this one.
Now the next one is to deploy a DaemonSet for fluentD logging
using the given specifications.
One way to get the specification for DaemonSets is
to go to the coordinators documentation pages and get these right.
Since the structure is very similar to a deployment, an easier way to just do it
from here from the command line is to use the driver on option for a deployment
and create a file and then change it and may just make the necessary changes.
Let's assume that we're going to create a deployment because there is no create
DaemonSets command as of this recording.
We're going to have to do a re-deployment.
The name is what's given here.
Its elasticsearch namespace is Kube-system.
Image is this,
and then we're going to do a dry run.
We're going to do dry-run=client,
and then we're going to do an output to yaml.
We'll write that to
just call it on the yaml, then we're going to edit this file.
The kind is going to be DaemonSets,
and we don't need replicas because DaemonSets don't have replicas.
You can actually look at it and compare it here.
There are no replicas so we're going to remove that
and then we'll get rid of the strategy and this one right here
and the rest, everything looks okay,
let's save that file
and
create it.
The namespace is Kube-system,
and we have that DaemonSet created.
It's not ready yet, but that should be okay.
This is of course a very simple example.
We've not provided any kind of options or parameters for this DaemonSets,
so we're just going to keep it super simple.
Yes, as far as this task is concerned, that's all that's asked.
That's the end of this lab.