Geeks With Blogs
Alex Hildyard

Having played around with the GKE and MiniKube "one stop" clusters, I wanted to build a multi-node K8 cluster from a bunch of CentOS VMs. The experience was pleasantly straightforward, following the instructions at https://kubernetes.io/docs/setup/independent/install-kubeadm/ with one or two caveats.

First of all, after the initial K8 installation, you will need to disable swap and remove the certificate keys on all nodes before you can either initialise the cluster on the master node or join a slave node to the cluster:

swapoff -a
service kubelet stop
rm -rf /var/lib/kubelet/pki

Also pay attention to the final output from "kubeadm init"; you will not be able to install a pod network until you have manually copied and permissioned the admin.conf file as described; instead, at least with K8 1.8, you'll get confusing W102 warnings about K8 falling back on localhost:8080:

scp root@<master_node>:/etc/kubernetes/admin.conf ~/.kube/config

And you'll need to do the same thing on the slave nodes if you want to be able to run cluster commands from them in addition. 

Finally. if you want to schedule pods on your master node, check it's taint-free (returns no taint) with:

kubectl describe node <master_node> | grep -i taint

So far as pod networks go, I installed Calico without any issues. You can then continue with the Sock Shop sample installation, and check all the expected services are running with:

kubectl get services --all-namespaces

Posted on Thursday, October 12, 2017 9:05 AM | Back to top


Comments on this post: Installing a Kubernetes Cluster on CentOS 7

# re: Installing a Kubernetes Cluster on CentOS 7
Requesting Gravatar...
Left by Petr on Oct 12, 2017 2:25 PM

# re: Installing a Kubernetes Cluster on CentOS 7
Requesting Gravatar...
Great stuff!!
Marketmuni
Left by Nishith on Oct 24, 2017 6:18 AM

# re: Installing a Kubernetes Cluster on CentOS 7
Requesting Gravatar...
Nice share! Thanks.
Left by Roger on Oct 29, 2017 8:42 AM

# re: Installing a Kubernetes Cluster on CentOS 7
Requesting Gravatar...
Finaly i found solution. TY!!!
Best atv winch
Left by Ken on Oct 30, 2017 3:56 AM

# re: Installing a Kubernetes Cluster on CentOS 7
Requesting Gravatar...
Lovely
Good Health
Left by Nicole on Nov 15, 2017 3:38 PM

# re: Installing a Kubernetes Cluster on CentOS 7
Requesting Gravatar...
Left by Nicole on Nov 23, 2017 8:20 PM

# re: Installing a Kubernetes Cluster on CentOS 7
Requesting Gravatar...
Lovely Work
Good Health
Left by Nicole on Nov 25, 2017 5:10 PM

# re: Installing a Kubernetes Cluster on CentOS 7
Requesting Gravatar...
What resource would you recommend for building up the network of CentOS VM's using Virtualbox? How would you recommend actually configuring those to interconnect?
Left by Sarah on Dec 05, 2017 9:27 PM

Your comment:
 (will show your gravatar)


Copyright © Alex Hildyard | Powered by: GeeksWithBlogs.net