Configure Kubernetes Cluster on master nodeĥ.1 Create a user named "testuser" who has sudo privilegeĥ.2 Create config for Kubernetes Cluster for the testuser. If it completes successfully, save below "kubeadm join" command which will be used to join other worker nodes into this Kubernetes Cluster. The steps to deploy flannel is in step #5.3.
So we specify the network range as "-pod-network-cidr 10.244.0.0/16". Here we will choose flannel as the POD network, and basically Flannel runs a small, single binary agent called flanneld on each host, and is responsible for allocating a subnet lease to each host out of a larger, preconfigured address space.
Initialize Kubernetes Cluster on master node KUBELET_KUBEADM_ARGS=-cgroup-driver=cgroupfs -network-plugin=cniĤ. Note: When using Docker, kubeadm will automatically detect the cgroup driver for the kubelet and set it in the /var/lib/kubelet/kubeadm-flags.env file during runtime. Install Kubernetes tools: kubectl, kubelet and kubeadm Yum install -y yum-utils device-mapper-persistent-data lvm2Īfter that, Docker should be started and enabled. #/dev/mapper/centos-swap swap swap defaults 0 0īr_netfilter module is required to enable transparent masquerading and to facilitate VxLAN traffic for communication between Kubernetes pods across the cluster.Įcho '1' > /proc/sys/net/bridge/bridge-nf-call-iptables Then edit /etc/fstab to comment out the swap, for example:
#Install apache spark on centos 6 how to
How to install a Kubernetes Cluster on CentOS 7Ĥ Nodes(v1 to v4, and v1 will be the master node for Kubernetes Cluster):Ĭhange it at current runtime session level:Ĭhange it at system level by modifying /etc/selinux/config:Īfter rebooting, use below command to confirm selinux is disabled: