diff --git a/docs/03-pod-networking.md b/docs/03-pod-networking.md index 5d78c32..200f273 100644 --- a/docs/03-pod-networking.md +++ b/docs/03-pod-networking.md @@ -198,6 +198,7 @@ May 03 13:43:43 example-server kubelet[23701]: I0503 13:43:43.862719 23701 eve As we can see cni plugin is not initialized. But what is cni plugin. > CNI stands for Container Networking Interface. It is a standard for defining how network connectivity is established and managed between containers, as well as between containers and the host system in a container runtime environment. Kubernetes uses CNI plugins to implement networking for pods. + > A CNI plugin is a binary executable that is responsible for configuring the network interfaces and routes of a container or pod. It communicates with the container runtime (such as Docker or CRI-O) to set up networking for the container or pod. As we can see kubelet can't configure network for pod by himself, same as with containers, to configure network kubelet use some 'protocol' to communicate with 'someone' who can configure networ. @@ -508,4 +509,4 @@ Output: POD ID CREATED STATE NAME NAMESPACE ATTEMPT RUNTIME ``` -Next: [ETCD](./docs/04-etcd.md) \ No newline at end of file +Next: [ETCD](./04-etcd.md) \ No newline at end of file diff --git a/docs/04-etcd.md b/docs/04-etcd.md index a61cba3..7a9db0c 100644 --- a/docs/04-etcd.md +++ b/docs/04-etcd.md @@ -1,13 +1,13 @@ # ETCD +At this point we already know that we can run pods even withour API server. But current aproach os not very confortable to use, to create pod we need to place some manifest in some place. it is not very comfortable to manage. Now we will start our jorney of configuring "real" kubernetes. And of cource all our manifests should be stored somewhere. + ![image](./img/04_cluster_architecture_etcd.png "Kubelet") -це все звісно прикольно але потрібно всетаки почати конфігурувати нормальний кубернетес -а для цього нам потрібно мати базу данних де можуть зберігатись всі необхідні кубернетесу речі +For kubernetes (at least for original one it I can say so) we need to configura database called ETCD. -і відповідно почати потрібно із ітісіді +To configure db (and other kubennetes components in future) we will need some tools to configure certificates. -потрібно встановити всі необхідні нам інструменти для генерації сертифікатів ```bash { wget -q --show-progress --https-only --timestamping \ @@ -18,7 +18,9 @@ } ``` -тепер потрібно згенерувати сертифікат яким ми будемо підписувати всі інші сертифікати +And now lets begin our etcd configuration journey. + +First of all we will create ca certificate file. ```bash { @@ -61,14 +63,15 @@ cfssl gencert -initca ca-csr.json | cfssljson -bare ca } ``` -Результат: +Generated files: ``` ca-key.pem ca.csr ca.pem ``` -такс, а тепер нам потрібно згенерувати сертифікат який уже власне буде використовуватись самим ітісіді (але якщо бути точним то не тільки, але про то ми дізнаємось трохи згодом) +Now, we need to create certificate which will be used by ETCD (not only ETCD, but about that in next parts) as server cert. + ```bash { HOST_NAME=$(hostname -a) @@ -103,22 +106,31 @@ cfssl gencert \ } ``` -Завантажимо etcd +Generated files: ``` +kubernetes.csr +kubernetes-key.pem +kubernetes.pem +``` + +Now, when we have all required certs, we need to download etcd + +```bash wget -q --show-progress --https-only --timestamping \ "https://github.com/etcd-io/etcd/releases/download/v3.4.15/etcd-v3.4.15-linux-amd64.tar.gz" ``` - -Розпакувати і помістити etcd у диреторію /usr/local/bin/ -``` +Decompres and install it to the proper folder +```bash { tar -xvf etcd-v3.4.15-linux-amd64.tar.gz sudo mv etcd-v3.4.15-linux-amd64/etcd* /usr/local/bin/ } ``` -``` +When etcd is installed, we need to move our generated certificates to the proper folder + +```bash { sudo mkdir -p /etc/etcd /var/lib/etcd sudo chmod 700 /var/lib/etcd @@ -128,7 +140,9 @@ wget -q --show-progress --https-only --timestamping \ } ``` -``` +Create etcd service configuration file + +```bash cat < бачимо що йому ніхто ще не проставив ноду, а без ноди кублєт сам не запустить под -Next: [Scheduler](./docs/08-scheduler.md) \ No newline at end of file +Next: [Scheduler](./08-scheduler.md) \ No newline at end of file diff --git a/docs/08-scheduler.md b/docs/08-scheduler.md index c8871af..4ca2d8f 100644 --- a/docs/08-scheduler.md +++ b/docs/08-scheduler.md @@ -148,4 +148,4 @@ Hello, World from deployment! ... ``` -Next: [Kube proxy](./docs/09-kubeproxy.md) \ No newline at end of file +Next: [Kube proxy](./09-kubeproxy.md) \ No newline at end of file diff --git a/docs/09-kubeproxy.md b/docs/09-kubeproxy.md index 5982fe6..ed55d8d 100644 --- a/docs/09-kubeproxy.md +++ b/docs/09-kubeproxy.md @@ -310,4 +310,4 @@ written to stdout ``` ух ти у нас все вийшло -Next: [DNS in Kubernetes](./docs/10-dns.md) \ No newline at end of file +Next: [DNS in Kubernetes](./10-dns.md) \ No newline at end of file