Using Kubeasz to install multi-master multi-slave k8s cluster One, Project introduction
Kubeasz for GitHub on the open source of a project for the installation of k8s cluster, there are many methods to install k8s, but more than single-master multi-node installation, but Kubeasz can be very convenient to achieve multi-master multi-from, for the experiment is really convenient. The core of the project is the use of ansible, so follow the Kubeasz comes with the template and the project comes with the tutorial, it is convenient to install the complete.
Install k8s cluster using ansible script, introduce the principle of component interaction, convenient and direct, not affected by domestic network environment:
Https://github.com/gjmzj/kubeasz
Required k8s offline binary package: Https://pan.baidu.com/s/1c4RFaA
Extended reading: docker-from getting started to practicing
Second, installation issues record 1, LB load balancing settings
Here the LB load balancer in the Hosts.m-masters.example file, remember to need to load balanced NIC write pair, Centos7 default NIC is not eth0 use ifconfig command to see if ens190.
And, the load balancer here does not require you to install haproxy+keepalived on your machine, but instead lets you specify which two machines need to be installed on the hosts.m-masters.example file master_ip= "192.168.1.10 "The main machine in the two load balancers you set up is not to let you find another machine to do master."
2. Modify the environment variables after the installation is complete
Because the file is installed by default in/opt/kube/bin, if you do not change the installation path at the time of Setup, the direct use of Docker, Kubectl and other commands is recognized by the system, you need to set the system variable environment.
vim ~/.bash_profile# 添加/opt/kube/bin路径PATH=$PATH:$HOME/bin:/opt/kube/binsource ~/.bash_profile
This allows you to directly use the commands such as Docker, Kubectl, and so on.
Not finished, follow up ...
"K8s Installation" uses Kubeasz to install multi-master multi-slave k8s clusters (simple and fast)