

Best way to install kubernetes cluster how to#


Sudo echo '1' > /proc/sys/net/bridge/bridge-nf-call-iptables Sudo firewall-cmd -permanent -add-port=10255/tcp Sudo firewall-cmd -permanent -add-port=10252/tcp Sudo firewall-cmd -permanent -add-port=10251/tcp Sudo firewall-cmd -permanent -add-port=10250/tcp Sudo firewall-cmd -permanent -add-port=2379-2380/tcp Sudo firewall-cmd -permanent -add-port=6443/tcp Next, you need to open up the proper firewall ports with the following commands: The first thing to do is to install an older version of docker-ce with the command: There is a bit of trickery to be had for this process. Because of this, you’ll need to install the docker engine. Installing Docker-CEĪt the moment, Kubernetes cannot work with Podman (which is now the default container engine for both RHEL and CentOS). In that file, add something like this at the bottom (modifying to match your hostnames and IP addresses): Next, open the hosts file for editing with the command: Once you’ve set the hostname, log out and log back in.

Where HOSTNAME is the hostname to be used (such as kubemaster or kubenode). The first thing to do is set the hostnames of your servers and then modify the /etc/hosts file. Unless otherwise noted, you’ll take care of everything below on both the master and nodes. With all of that in hand, let’s get to work. You’ll also need a user account with sudo privileges and access to the root user account. I’ll be demonstrating on two CentOS 8 servers, running on IP addresses: In order to successfully install Kubernetes (and create a cluster), you’ll need at least two machines. If you’re looking to deploy a Kubernetes cluster on CentOS 8, the changes made to the operating system will directly affect you.īut how? Although they don’t change the way you deploy the actual cluster, getting everything in place for the deployment is quite different.įear not, I’m going to walk you through the process of installing Kubernetes on CentOS 8, so you can then get back to the business of deploying your cluster and managing your containers. Such is the case with installing Kubernetes. Many of those changes have caused admins to approach their tasks differently. If you’ve migrated over from Red Hat’s CentOS 7 to CentOS 8, you’ve probably noticed a lot of changes have taken place.
