WEBVTT

00:00.634 --> 00:04.594
-Okay, so let's go through
the lab on DaemonSets.

00:05.135 --> 00:08.001
The first question is
how many DaemonSets are created

00:08.009 --> 00:10.640
in the cluster in all namespaces.

00:11.050 --> 00:14.767
Let's do a Kubectl get DaemonSets.

00:15.639 --> 00:18.202
If you look at the default namespace,
there are none,

00:18.723 --> 00:21.953
but if you want to look at all namespaces,
you do a -A.

00:23.223 --> 00:26.712
We see that there are two
DaemonSets in all namespaces.

00:27.244 --> 00:29.373
It's the Kube-flannel-ds and Kube-proxy.

00:29.728 --> 00:30.828
That's two.

00:34.928 --> 00:38.867
The next question is which namespace
are the DaemonSets created in.

00:41.141 --> 00:44.216
If you look at the namespace column here,
we see that

00:44.296 --> 00:46.502
they are in the Kube-system namespace.

00:46.605 --> 00:47.990
That Kube-system

00:52.506 --> 00:54.811
and which of the below is a DaemonSet.

00:55.752 --> 00:58.200
If you look here,
we have the Kube-flannel-ds

00:58.208 --> 01:00.080
and Kube-proxy these are the DaemonSets.

01:00.539 --> 01:04.123
Scheduler, Coredns, ancdmaster.
These are not,

01:04.642 --> 01:07.981
it's the Kubes-flannel-ds
that's the DaemonSets.

01:12.037 --> 01:16.130
On how many nodes are the pods scheduled
by the DaemonSets Kube-proxy.

01:16.703 --> 01:18.312
If you look at Kube-proxy here,

01:18.457 --> 01:23.055
we see the desired and current
and ready numbers are one.

01:24.794 --> 01:25.506
It's one.

01:26.065 --> 01:30.257
Let's also look at it in detail.

01:30.259 --> 01:36.071
We go describe DaemonSets Kube-proxy.

01:40.134 --> 01:45.744
The namespace is Kube-system,
it means that.

01:48.070 --> 01:51.491
Here you can see the desired number
of nodes scheduled is one,

01:51.748 --> 01:53.688
current number of nodes
should do this one.

01:53.934 --> 01:56.180
It's just one.

02:04.674 --> 02:09.197
That's also because
if you look at this cluster,

02:11.026 --> 02:13.701
there's only one node
and that's the reason it's just one.

02:14.637 --> 02:19.470
What is the image used by the pod deployed
by the Kube-flannel-ds daemonset?

02:25.019 --> 02:29.932
Let's look at the Kube-flannel-ds
a bit more detail.

02:29.943 --> 02:35.302
Describe DaemonSets, Kube-flannel-ds.

02:35.980 --> 02:38.580
Then the next space is Kube-system

02:39.700 --> 02:45.810
and we see that the image is
the one under coreOS flannel.

02:46.251 --> 02:47.266
That's this one.

02:52.491 --> 02:56.688
Now the next one is to deploy
a DaemonSet for fluentD logging

02:58.059 --> 02:59.739
using the given specifications.

03:01.180 --> 03:06.929
One way to get
the specification for DaemonSets is

03:07.501 --> 03:11.401
to go to the coordinators documentation
pages and get these right.

03:13.530 --> 03:19.868
Since the structure is very similar to
a deployment, an easier way to just do it

03:19.873 --> 03:25.606
from here from the command line is to use
the driver on option for a deployment

03:25.909 --> 03:29.770
and create a file and then change it
and may just make the necessary changes.

03:30.311 --> 03:34.454
Let's assume that we're going to create
a deployment because there is no create

03:35.189 --> 03:39.859
DaemonSets command as of this recording.

03:42.350 --> 03:44.431
We're going to have to do a re-deployment.

03:47.599 --> 03:51.532
The name is what's given here.

03:51.538 --> 03:57.401
Its elasticsearch
namespace is Kube-system.

03:59.039 --> 04:02.407
Image is this,

04:04.540 --> 04:06.966
and then we're going to do a dry run.

04:07.790 --> 04:09.685
We're going to do dry-run=client,

04:10.431 --> 04:14.118
and then we're going to do
an output to yaml.

04:15.054 --> 04:17.715
We'll write that to

04:21.440 --> 04:28.782
just call it on the yaml,
then we're going to edit this file.

04:29.207 --> 04:32.380
The kind is going to be DaemonSets,

04:36.897 --> 04:40.282
and we don't need replicas because
DaemonSets don't have replicas.

04:40.380 --> 04:42.947
You can actually look at it
and compare it here.

04:43.842 --> 04:46.004
There are no replicas
so we're going to remove that

04:48.139 --> 04:53.792
and then we'll get rid of the strategy
and this one right here

04:54.487 --> 04:56.265
and the rest, everything looks okay,

04:57.259 --> 04:58.545
let's save that file

04:59.847 --> 05:00.572
and

05:04.338 --> 05:05.075
create it.

05:11.746 --> 05:14.068
The namespace is Kube-system,

05:16.417 --> 05:18.910
and we have that DaemonSet created.

05:20.042 --> 05:23.138
It's not ready yet,
but that should be okay.

05:23.753 --> 05:26.827
This is of course a very simple example.

05:26.875 --> 05:32.025
We've not provided any kind of options
or parameters for this DaemonSets,

05:32.032 --> 05:34.334
so we're just going to keep it
super simple.

05:35.336 --> 05:39.251
Yes, as far as this task is concerned,
that's all that's asked.

05:42.310 --> 05:44.299
That's the end of this lab.

