-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# ETCD in Kubernetes | ||
- Take me to [Video Tutorial](https://kodekloud.com/courses/539883/lectures/9808160) | ||
|
||
In this section, we will take a look at ETCD role in kubernetes | ||
|
||
## ETCD Datastore | ||
- The ETCD Datastore stores information regarding the cluster such as **`Nodes`**, **`PODS`**, **`Configs`**, **`Secrets`**, **`Accounts`**, **`Roles`**, **`Bindings`** and **`Others`**. | ||
- Every information you see when you run the **`kubectl get`** command is from the **`ETCD Server`**. | ||
|
||
## Setup - Manual | ||
- If you setup your cluster from scratch then you deploy **`ETCD`** by downloading ETCD Binaries yourself | ||
- Installing Binaries and Configuring ETCD as a service in your master node yourself. | ||
|
||
![etcd](../../images/etcd.PNG) | ||
|
||
## Setup - Kubeadm | ||
- If you setup your cluster using **`kubeadm`** then kubeadm will deploy etcd server for you as a pod in **`kube-system`** namespace. | ||
``` | ||
$ kubectl get pods -n kube-system | ||
``` | ||
![etcd1](../../images/etcd1.PNG) | ||
|
||
## Explore ETCD | ||
- To list all keys stored by kubernetes, run the below command | ||
``` | ||
$ kubectl exec etcd-master -n kube-system etcdctl get / --prefix -key | ||
``` | ||
- Kubernetes Stores data in a specific directory structure, the root directory is the **`registry`** and under that you have varies kubernetes constructs such as **`minions`**, **`nodes`**, **`pods`**, **`replicasets`**, **`deployments`**, **`roles`**, **`secrets`** and **`Others`**. | ||
|
||
![etcdctl1](../../images/etcdctl1.PNG) | ||
|
||
## ETCD in HA Environment | ||
- In a high availability environment, you will have multiple master nodes in your cluster that will have multiple ETCD Instances spread across the master nodes. | ||
- Make sure etcd instances know each other by setting the right parameter in the **`etcd.service`** configuration. The **`--initial-cluster`** option where you need to specify the different instances of the etcd service. | ||
![etcd-ha](../../images/etcd-ha.PNG) |