https:\/\/docs.projectcalico.org\/getting-started\/kubernetes\/quickstart#overview<\/a><\/p>\n\n\n\nIssue the following command:<\/p>\n\n\n\n
kubeadm init --pod-network-cidr 192.168.0.0\/16<\/pre>\n\n\n\nYou should see something like the example below. Make note of the discovery token, it\u2019s needed to join worker nodes to the cluster.<\/p>\n\n\n\n
Note that the join token below is just an example.<\/p>\n\n\n\n
kubeadm join 94.237.41.193:6443 --token 4xrp9o.v345aic7zc1bj8ba \n--discovery-token-ca-cert-hash sha256:b2e459930f030787654489ba7ccbc701c29b3b60e0aa4998706fe0052de8794c<\/pre>\n\n\n\nMake the following directory and configuration files.<\/p>\n\n\n\n
mkdir -p $HOME\/.kube\ncp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\nchown $(id -u):$(id -g) $HOME\/.kube\/config\nkubectl apply -f https:\/\/docs.projectcalico.org\/manifests\/calico.yaml<\/pre>\n\n\n\n7. Enable pod to run on Master. This is only for demonstration purposes and is not recommended for production use.<\/p>\n\n\n\n
kubectl taint nodes --all node-role.kubernetes.io\/master-<\/pre>\n\n\n\n8. Check that Master node has been enabled and is running.<\/p>\n\n\n\n
kubectl get nodes<\/pre>\n\n\n\nNAME STATUS ROLES AGE VERSION\nmaster NotReady master 91s v1.18.0<\/pre>\n\n\n\nOn successful execution, you should see a node with ready status. If not, wait a moment and repeat the command.<\/p>\n\n\n\n
When the Master node is up and running, continue with the next section to join the Worker node to the cluster.<\/p>\n\n\n\n
Configuring Kubernetes on the Worker node only<\/h2>\n\n\n\n
Each Kubernetes installation needs to have one or more worker nodes that run the containerized applications. We\u2019ll only configure one worker in this example but repeat these steps to join more nodes to your cluster.<\/p>\n\n\n\n
1. Open ports used by Kubernetes.<\/p>\n\n\n\n
firewall-cmd --zone=public --permanent --add-port={10250,30000-32767}\/tcp<\/pre>\n\n\n\n2. Make the changes permanent.<\/p>\n\n\n\n
firewall-cmd --reload<\/pre>\n\n\n\n3. Join the cluster with the previously noted token.<\/p>\n\n\n\n
Note that the join token below is just an example.<\/p>\n\n\n\n
kubeadm join 94.237.41.193:6443 --token 4xrp9o.v345aic7zc1bj8ba \n--discovery-token-ca-cert-hash sha256:b2e459930f030787654489ba7ccbc701c29b3b60e0aa4998706fe0052de8794c<\/pre>\n\n\n\n4. See if the Worker node successfully joined.<\/p>\n\n\n\n
Go back to the Master node and issue the following command.<\/p>\n\n\n\n
kubectl get nodes<\/pre>\n\n\n\nNAME STATUS ROLES AGE VERSION\nmaster Ready master 10m v1.18.0\nworker Ready 28s v1.18.0<\/pre>\n\n\n\nOn success, you should see two nodes with ready status. If not, wait a moment and repeat the command.<\/p>\n\n\n\n
Finished!<\/h2>\n\n\n\n
Congratulations, you should now have a working Kubernetes installation running on two nodes.<\/p>\n\n\n\n
In case anything goes wrong, you can always repeat the process.<\/p>\n\n\n\n
Run this on Master and Workers: kubeadm reset && rm -rf \/etc\/cni\/net.d<\/tt><\/p>\n\n\n\n
Have fun clustering.<\/p>\n","protected":false},"featured_media":14247,"comment_status":"open","ping_status":"closed","template":"","community-category":[113,114],"class_list":["post-24880","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry","community-category-integrations","community-category-kubernetes"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/types\/tutorial"}],"replies":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/comments?post=24880"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/14247"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24880"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}