![]() ![]() ~]# export kubever=$(kubectl version | base64 | tr -d ~]# kubectl apply -f "$kubever" Run the beneath command to deploy network. POD network is the overlay network between the worker nodes. To make the cluster status ready and kube-dns status running, deploy the pod network so that containers of different host communicated each other. Try to run below commands to get status of cluster and pods. ~]# mkdir -p ~]# cp -i /etc/kubernetes/nf ~]# chown $(id -u):$(id -g) $HOME/.kube/config Step 5: Deploy pod network to the cluster Execute the beneath commands to use the cluster as root user. Output of above command would be something like belowĪs we can see in the output that kubernetes master has been initialized successfully. Run the beneath command to initialize and setup kubernetes master. Start and enable kubectl and docker service ~]# systemctl restart docker & systemctl enable ~]# systemctl restart kubelet & systemctl enable kubelet Step 4: Initialize Kubernetes Master with ‘kubeadm init’ Once the package repositories are configured, run the beneath command to install kubeadm and docker packages. > EOF ~]# Step 3: Install Kubeadm and Docker Kubernetes packages are not available in the default CentOS 7 & RHEL 7 repositories, Use below command to configure its package repositories. Note: In case you don’t have your own dns server then update /etc/hosts file on master and worker nodes 192.168.1.30 k8s-masterĭisable Swap in all nodes using “ swapoff -a” command and remove or comment out swap partitions or swap file from fstab file Step 2: Configure Kubernetes Repository ~]# firewall-cmd -permanent ~]# firewall-cmd -permanent ~]# firewall-cmd -permanent ~]# firewall-cmd -permanent ~]# firewall-cmd -permanent ~]# firewall-cmd -permanent ~]# firewall-cmd ~]# modprobe ~]# echo '1' > /proc/sys/net/bridge/bridge-nf-call-iptables ~]# sed -i -follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux Login to your kubernetes master node and set the hostname and disable selinux using following commands ~]# hostnamectl set-hostname 'k8s-master' Perform the following steps on Master Node Step 1: Disable SELinux & setup firewall rules Installations Steps of Kubernetes 1.7 on CentOS 7 / RHEL 7
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |