1
00:00:01,060 --> 00:00:03,820
Hello and welcome to this lecture in the previous lecture.

2
00:00:03,820 --> 00:00:06,910
we discussed the basics of ETCD. In this

3
00:00:06,910 --> 00:00:13,330
lecture we will talk about ETCD’s role in kubernetes.
The ETCD datastore stores information regarding the

4
00:00:13,330 --> 00:00:20,170
cluster such as the nodes, pods, configs, secrets, accounts, roles, bindings and others.

5
00:00:20,350 --> 00:00:26,800
Every information you see when you run the kubectl get command is from the ETCD server. Every change

6
00:00:26,860 --> 00:00:33,250
you make to your cluster, such as adding additional nodes, deploying pods or replica sets are updated

7
00:00:33,340 --> 00:00:40,300
in the ETCD  server. Only once it is updated in the ETCD server, is the change considered to be complete.

8
00:00:41,330 --> 00:00:48,530
Depending on how you setup your cluster, ETCD is deployed differently. Throughout this section we discuss

9
00:00:48,530 --> 00:00:55,550
about two types of kubernetes deployment. One deployed from scratch and other using kubeadm tool.

10
00:00:56,310 --> 00:01:01,490
The practice test environments are deployed using the kubeadm tool and later in this course when

11
00:01:01,490 --> 00:01:07,550
we set up a cluster we set it up from scratch so it's good to know the difference between the two methods

12
00:01:08,360 --> 00:01:14,360
if you set up your cluster from scratch then you deploy ETCD by downloading the ETCD binaries yourself,

13
00:01:14,810 --> 00:01:20,900
installing the binaries and configuring ETCD as a service in your master node yourself. There are many

14
00:01:20,900 --> 00:01:27,290
options passed into the service a number of them relate to certificates we will learn more about these

15
00:01:27,290 --> 00:01:33,500
certificates how to create them and how to configure them later in this course we have a whole section

16
00:01:33,500 --> 00:01:40,610
on TLS certificates. The others are about configuring ETCD as a cluster. We will look at those options

17
00:01:40,700 --> 00:01:47,730
when we set up high availability in kubernetes the only option to note for now is the advertised client

18
00:01:47,760 --> 00:01:48,400
url.

19
00:01:48,900 --> 00:01:55,650
This is the address on which ETCD listens. It happens to be on the IP of the server and on port

20
00:01:55,650 --> 00:02:00,390
2379, which is the default port on which etcd listens.

21
00:02:00,390 --> 00:02:06,170
This is the URL that should be configured on the kube-api server when it tries to reach the etcd server.

22
00:02:07,140 --> 00:02:13,770
If you setup your cluster using kubeadm then kubeadm deploys the ETCD server for you as a POD in

23
00:02:13,770 --> 00:02:20,360
the kube-system namespace. You can explore the etcd database using the etcdctl utility within this

24
00:02:20,360 --> 00:02:30,320
pod. To list all keys stored by kubernetes, run the etcdctl get command like this. Kubernetes stores

25
00:02:30,330 --> 00:02:36,750
data in the specific directory structure the root directory is a registry and under that you have the

26
00:02:36,750 --> 00:02:44,380
various kubernetes constructs such as minions or nodes, pods, replicasets, deployments etc. In a

27
00:02:44,380 --> 00:02:49,420
high availability environment you will have multiple master nodes in your cluster then you will have

28
00:02:49,420 --> 00:02:53,030
multiple ETCD instances spread across the master nodes.

29
00:02:53,170 --> 00:02:58,450
In that case, make sure to specify the ETCD instances know about each other by setting the right parameter

30
00:02:58,480 --> 00:03:04,090
in the ETCD service configuration. The initial-cluster option is where you must specify the different

31
00:03:04,180 --> 00:03:06,850
instances of the ETCD service.

32
00:03:06,850 --> 00:03:12,130
We talk about high availability in much more detail later in this course but I thought its worth while

33
00:03:12,160 --> 00:03:14,050
to point it out here.

34
00:03:14,050 --> 00:03:16,900
Well, that's it for this lecture and I will see you in the next.
