Configure Master Node with Kubectl

After installing the Containerd, Kubectl, and Kubeadm packages in the master node, configure the master node with Kubectl to create Kubernetes cluster.

To configure Kubectl in the master node, follow the step below:

  1. Open Linux terminal in the master node, and run the following commands one by one.
    kubeadm init --kubernetes-version=${KUBE_VERSION}
    cp /etc/kubernetes/admin.conf $HOME/ 
    chown $(id -u) $HOME/admin.conf 
    export KUBECONFIG=$HOME/admin.conf 
    kubectl apply -f https://github.com/weaveworks/weave/releases/download/v2.8.1/weave-daemonset-k8s.yaml 
    Note: Store the value of the 'kubeadm init--kubernetes-version=${KUBE_VERSION}' this is used in join command in next section.