Tecnologia da Informação - TI : Install Kubernetes which is the Orchestration System for Docker Containers

Total de visualizações de página

quinta-feira, 14 de abril de 2016

Install Kubernetes which is the Orchestration System for Docker Containers




Install Kubernetes which is the Orchestration System for Docker Containers.
For example, Configure Kubernetes Cluster with 1 Admon Node and 2 Container Node like follows.
                       +---------------------+
                       | [   Admin Node    ] |
                       |  dlp.server.world   |
                       |                     |
                       +----------+----------+
                                  |
+----------------------+          |          +----------------------+
| [       Node01     ] |10.0.0.51 | 10.0.0.52| [       Node02     ] |
| node01.server.world  +----------+----------+  node02.server.world |
|                      |                     |                      |
+----------------------+                     +----------------------+

 
Configure Container Node on this section.
[1]
[2]Install Kubernetes and Flannel on All Nodes.
[root@node01 ~]# 
yum -y install kubernetes flannel
[3]Configure Kubernetes on all Nodes like follows.
[root@node01 ~]# 
vi /etc/kubernetes/config
# line 22: change to Admin Node's hostname or IP address

KUBE_MASTER="--master=http://
dlp.server.world
:8080"
[root@node01 ~]# 
vi /etc/kubernetes/kubelet
# line 5: change

KUBELET_ADDRESS="--address=
0.0.0.0
"
# line 11: change to own hostname

KUBELET_HOSTNAME="--hostname_override=
node01
"
# line 14: change to Admin Node's hostname or IP address

KUBELET_API_SERVER="--api_servers=http://
dlp.server.world
:8080"
[root@node01 ~]# 
vi /etc/sysconfig/flanneld
# line 4: change to Admin Node's hostname or IP address

FLANNEL_ETCD="http://
dlp.server.world
:2379"
# stop docker0 interface

[root@node01 ~]# 
nmcli c down docker0 

Connection 'docker0' successfully deactivated 
(D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)
[root@node01 ~]# 
systemctl start flanneld kube-proxy kubelet 

[root@node01 ~]# 
systemctl enable flanneld kube-proxy kubelet 

[root@node01 ~]# 
systemctl restart docker 
[4]Make sure th settings. It's OK if the status of each node is Ready like follows.
[root@dlp ~]# 
kubectl get nodes 

NAME      LABELS                          STATUS
node01    kubernetes.io/hostname=node01   Ready
node02    kubernetes.io/hostname=node02   Ready

Nenhum comentário:

Postar um comentário

O Caminho para a Infraestrutura Ágil: Modernizar ou Estagnar?

  Com certeza. Para um post mais denso e detalhado, o ideal é abordar a Transformação Digital e a Modernização da Infraestrutura . Esse tipo...