- INSTALL KUBERNETES CLUSTER RHEL 7 HOW TO
- INSTALL KUBERNETES CLUSTER RHEL 7 INSTALL
- INSTALL KUBERNETES CLUSTER RHEL 7 UPDATE
# cp -i /etc/kubernetes/nf $HOME/.kube/config You can change to a sudo enabled user you prefer and run the below using sudo. In our case, we want to run this installation as root user, therefore we will go ahead and run these commands as root. Having initialized Kubernetes successfully, you will need to allow your user to start using the cluster. So, you will delete the ‘\’ character accompanying the -token and your final command will look like this. Tip: Sometimes this command might complain about the arguments ( args) passed, so edit it to avoid any errors. You may want to copy the last line and save it somewhere because you will need to run it on the worker nodes. Initializing Kubernetes master is a fully automated process that is managed by the “ kubeadm init“ command which you will run. Now we are ready to initialize kubernetes master, but before that you need to disable swap in order to run “ kubeadm init“ command. Step 4: Initialize Kubernetes Master and Setup Default User When the installation completes successfully, enable and start both services.
INSTALL KUBERNETES CLUSTER RHEL 7 INSTALL
With the package repo now ready, you can go ahead and install kubeadm and docker packages. You will need to add Kubernetes repositories manually as they do not come installed by default on CentOS 7. # echo '1' > /proc/sys/net/bridge/bridge-nf-call-iptables # firewall-cmd -permanent -add-port=10255/tcp # firewall-cmd -permanent -add-port=10252/tcp # firewall-cmd -permanent -add-port=10251/tcp # firewall-cmd -permanent -add-port=10250/tcp # firewall-cmd -permanent -add-port=6443/tcp Make sure that each firewall-cmd command, returns a success. Set the following firewall rules on ports. # sed -i -follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
INSTALL KUBERNETES CLUSTER RHEL 7 UPDATE
Next, disable SElinux and update your firewall rules. You can ping worker-node-1 and worker-node-2 to test if your updated hostfile is fine using ping command.
On your master node, set the hostname and if you don’t have a DNS server, then also update your /etc/hosts file. Step 1: Prepare Hostname, Firewall and SELinux The following steps will run on the Master-Node. For this installation, we will use docker as it is the most popular. Our 3-node cluster will look something like this: Kubernetes Cluster Diagram Installation of Kubernetes Cluster on Master-Nodeįor Kubernetes to work, you will need a containerization engine. In this tutorial, I will be using my root account. You will also need access to an account with sudo or root privileges.Equally, you will need to make sure that the yum package manager is installed by default and can fetch packages remotely. We will be fetching Kubernetes and docker packages from the repository. Internet connectivity on all your nodes.
It is recommended that your Master Node have at least 2 CPUs, though this is not a strict requirement. Multiple servers running Centos 7 ( 1 Master Node, 2 Worker Nodes).This tutorial is command-line based so you will need access to your terminal window.
INSTALL KUBERNETES CLUSTER RHEL 7 HOW TO
Recommended Read: How to Install a Kubernetes Cluster on CentOS 8įor this tutorial, we will walk-through a multi-node Kubernetes cluster installation on CentOS 7 Linux. For this, you can use Minikube, which is a tool that runs a single-node Kubernetes cluster in a virtual machine on your node.
It’s also important to mention that you can also deploy a single-node Kubernetes cluster which is generally recommended for very light, non-production workloads. The worker-nodes are then managed from the master node, thus ensuring that the cluster is managed from a central point. It can manage and orchestrate not just docker runtimes but also Containers and Rkt runtimes.Ī typical Kubernetes cluster would generally have a master node and several worker-nodes or Minions. Donated by Google to the Opensource community, Kubernetes has now become the container management tool of choice.