WEBVTT

00:01.060 --> 00:03.820
Hello and welcome to this lecture in the previous lecture.

00:03.820 --> 00:06.910
we discussed the basics of ETCD. In this

00:06.910 --> 00:13.330
lecture we will talk about ETCD’s role in kubernetes.
The ETCD datastore stores information regarding the

00:13.330 --> 00:20.170
cluster such as the nodes, pods, configs, secrets, accounts, roles, bindings and others.

00:20.350 --> 00:26.800
Every information you see when you run the kubectl get command is from the ETCD server. Every change

00:26.860 --> 00:33.250
you make to your cluster, such as adding additional nodes, deploying pods or replica sets are updated

00:33.340 --> 00:40.300
in the ETCD  server. Only once it is updated in the ETCD server, is the change considered to be complete.

00:41.330 --> 00:48.530
Depending on how you setup your cluster, ETCD is deployed differently. Throughout this section we discuss

00:48.530 --> 00:55.550
about two types of kubernetes deployment. One deployed from scratch and other using kubeadm tool.

00:56.310 --> 01:01.490
The practice test environments are deployed using the kubeadm tool and later in this course when

01:01.490 --> 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

01:08.360 --> 01:14.360
if you set up your cluster from scratch then you deploy ETCD by downloading the ETCD binaries yourself,

01:14.810 --> 01:20.900
installing the binaries and configuring ETCD as a service in your master node yourself. There are many

01:20.900 --> 01:27.290
options passed into the service a number of them relate to certificates we will learn more about these

01:27.290 --> 01:33.500
certificates how to create them and how to configure them later in this course we have a whole section

01:33.500 --> 01:40.610
on TLS certificates. The others are about configuring ETCD as a cluster. We will look at those options

01:40.700 --> 01:47.730
when we set up high availability in kubernetes the only option to note for now is the advertised client

01:47.760 --> 01:48.400
url.

01:48.900 --> 01:55.650
This is the address on which ETCD listens. It happens to be on the IP of the server and on port

01:55.650 --> 02:00.390
2379, which is the default port on which etcd listens.

02:00.390 --> 02:06.170
This is the URL that should be configured on the kube-api server when it tries to reach the etcd server.

02:07.140 --> 02:13.770
If you setup your cluster using kubeadm then kubeadm deploys the ETCD server for you as a POD in

02:13.770 --> 02:20.360
the kube-system namespace. You can explore the etcd database using the etcdctl utility within this

02:20.360 --> 02:30.320
pod. To list all keys stored by kubernetes, run the etcdctl get command like this. Kubernetes stores

02:30.330 --> 02:36.750
data in the specific directory structure the root directory is a registry and under that you have the

02:36.750 --> 02:44.380
various kubernetes constructs such as minions or nodes, pods, replicasets, deployments etc. In a

02:44.380 --> 02:49.420
high availability environment you will have multiple master nodes in your cluster then you will have

02:49.420 --> 02:53.030
multiple ETCD instances spread across the master nodes.

02:53.170 --> 02:58.450
In that case, make sure to specify the ETCD instances know about each other by setting the right parameter

02:58.480 --> 03:04.090
in the ETCD service configuration. The initial-cluster option is where you must specify the different

03:04.180 --> 03:06.850
instances of the ETCD service.

03:06.850 --> 03:12.130
We talk about high availability in much more detail later in this course but I thought its worth while

03:12.160 --> 03:14.050
to point it out here.

03:14.050 --> 03:16.900
Well, that's it for this lecture and I will see you in the next.

