Member-only story
Introduction
As the number of containers increases, the network between containers becomes complicated, and the production environment and development environment become crowded, Docker becomes very difficult to manage.
This time, we will build a Kubernetes cluster on Ubuntu 18.04 LTS, which is the de facto standard for container orchestration tools .
This environment
- Virtual machine on Proxmox (Ubuntu Serer 18.04)
- Master & etcd 1 VM+ Workers 3 VM’s
- Built with Kubeadm
- Docker latest version
- Kubernetes v1.17.0
- Name:master — IP:10.21.21.100
- Name:worker01 — IP:10.21.21.101
- Name:worker02 — IP:10.21.21.102
- Name:worker03 — IP:10.21.21.103
$ sudo sh -c "echo \"master 10.21.21.100\" >> /etc/hosts"
$ sudo sh -c "echo \"worker01 10.21.21.101\" >> /etc/hosts"
$ sudo sh -c "echo \"worker02 10.21.21.102\" >> /etc/hosts"
$ sudo sh -c "echo \"worker03 10.21.21.103\" >> /etc/hosts"
Build Master node
Install Docker
I will do it for all VM’s
$ sudo sed -i 's|/swap|#/swap|' /etc/fstab
$ sudo sed -i 's|GRUB_CMDLINE_LINUX=""|GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"|' /etc/default/grub