The same image can be copied from the master. I have used the minimal configuration to set up the cluster.
#KUBEADM CENTOS 7 HOW TO#
In this article, I have explained how to create a Kubernetes cluster using Kubeadm. Supplementary note: Pulling images sometimes takes time. All the machines are CentOS-7 Virtual Machines. Kubectl label node node1 kubernetes.io/role=node Execute the kubeadm join output when installing the Master.Įxecute kubectl get nodes on the Master to view the addition result:
#KUBEADM CENTOS 7 INSTALL#
Install the network, here Calico is used.įollow the steps 1-9 of the Master installation to install. Ĭp -i /etc/kubernetes/nf $HOME/.kube/configĬhown $(id -u):$(id -g) $HOME/.kube/configĮxport KUBECONFIG=/etc/kubernetes/nfġ2. Record the instruction to join the node: kubeadm join. Until it succeeds, you will see the following interface: If there is no response for a long time and the mirror is not downloaded, you can kubeadm reset, restart kubelet, and then kubeadm init. It takes a long time to download the mirror.
![kubeadm centos 7 kubeadm centos 7](https://i1.wp.com/theithollow.com/wp-content/uploads/2019/01/kubeinit4.png)
kubeadm init, Calico's network is used here, so set -pod-network-cidr=192.168.0.0/16. Configure the cgroup so that the value of the cgroup in /etc/systemd/system//nf is the same as the cgroup in docker info. Systemctl enable kubelet & systemctl start kubeletħ. You need to execute the following commands:Ĥ. Systemctl enable docker & systemctl start dockerĭocker info View docker information, record docker version, and cgroup information:ĭocker has adjusted the default firewall rules since version 1.13, and disabled the FOWARD chain in the iptables filter table, which will cause the Pods across Nodes in the Kubernetes cluster to fail to communicate.
![kubeadm centos 7 kubeadm centos 7](https://www.itzgeek.com/wp-content/uploads/2018/12/Install-Kubernetes-on-CentOS-7-Cluster-Status-post-installing-Network-Add-on.jpg)
Vi /etc/selinux/config, change SELINUX=enforcing to SELINUX=disabled, restart the machine I will not teach you how to surf the Internet scientifically, please explore by yourself. As a pure technical person, it is best to focus on technology and achieve real scientific Internet access. As a technician, if you are not willing to toss, it is difficult to make a difference. If you can't use the Internet scientifically, this article will be meaningless. Scientific Internet, scientific Internet, scientific Internet, important things are said three times.