Deploy Kubernetes Cluster On Oracle Ravello with CentOS 7

Deploy Kubernetes Cluster On Oracle Ravello with CentOS 7

It’s undeniably true that everybody is looking for moving to the cloud technologies, and container orchestration is playing a major role in every aspects of the cloud technologies, so I just wanted to play around with Kubernetes and I started building my lab on Oracle Ravello Cloud which was given as a benefit to the VMware vExpert and this article explains the steps of deploying Kubernetes Cluster On Oracle Ravello Cloud with CentOS 7. Again, thank you Oracle for giving me a such opportunity.

I previously, wrote about an article about building a lab on Oracle Ravello Cloud and you can read it here. I wanted to start from the very beginning, otherwise I could have used some other cloud technology such as Google Kubernetes Engine to play around with.

Setting Up Virtual Machines To Deploy Kubernetes Cluster On Oracle Ravello

I started creating my Virtual Machines dragging and dropping empty Virtual Machine containers to setup the cluster and 8GB RAM and 2 vCPUs used as the resources.

I opened ssh, http and https services to the public access because of the future deployments

Kubernetes Cluster On Oracle Ravello : Create VMs

Application optimized for performance and US Central 1 is used to deploy the application.

Kubernetes Cluster On Oracle Ravello : Publish Application

For IP address assignments I used the Oracle Ravello Cloud DHCP server as I don’t wan’t to worry about the static IP address management

Kubernetes Cluster On Oracle Ravello : DHCP

I opened the console and proceed with the OS installation. One thing I noticed that there is a greater improvement of the VNC console user experience and previously I experienced differences in the actual mouse pointer and the VNC pointer. It is completely resolved and it was a really great experience.

Kubernetes Cluster On Oracle Ravello : Install OS

I completed the Operating System Installation on all four Nodes and let’s see the configuration

Deploying Kubernetes Cluster On CentOS 7

I experienced network connectivity issues and to fix the issue I set the “ONBOOT=yes” in the network interface

Kubernetes Cluster On Oracle Ravello : Set ONBOOT=yes

Changing parameter and restarting the networking services resolved the networking issue and make sure to update the Operating System with “yum -y update” command

Turn off swap on all servers

sudo swapoff -a

Make sure to edit the fstab located in /etc/fstab to permanently disable the swap to do that comment with a “#” the swap line

Kubernetes Cluster On Oracle Ravello : Permanently disable swap

Install docker

sudo yum -y install docker

Enable docker

sudo systemctl enable dockersudo systemctl start docker

Add the Kubernetes repo

cat << EOF | sudo tee /etc/yum.repos.d/kubernetes.repo

Turn off selinux

sudo setenforce 0
sudo vi /etc/selinux/config

Set the selinux status to permissive, it prints warnings only

Install Kubernetes Components

sudo yum install -y kubelet kubeadm kubectl
sudo systemctl enable kubelet
sudo systemctl start kubelet

Configure sysctl

cat << EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1

Initialize the Kube Master below configuration should only be run on the Master node, do not run on the worker nodes.

sudo kubeadm init --pod-network-cidr=

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

Make sure to take note of the “kubeadm join” command which we use to connect the worker nodes to the Master

Install the flannel networking

kubectl apply -f

Now execute”kubectl get nodes” command and see the status of the node status, roles, age and version

Errors Appeared In This Kubernetes Cluster Deployment

Make sure to swapoff and permanently disable Otherwise you might see below error message.

The connection to the server was refused – did you specify the right host or port?

When issuing the “kubeadm join” command below error might appear with the swap on

[preflight] Running pre-flight checks
[preflight] Some fatal errors occurred:
[ERROR Swap]: running with swap on is not supported. Please disable swap
[preflight] If you know what you are doing, you can make a check non-fatal with `–ignore-preflight-errors=…`

I had to disable the “firewalld” in order to Worker Nodes connect to the Master Node. Below error message appeared before disable the firewalld

[preflight] Running pre-flight checks
[discovery] Trying to connect to API Server “”
[discovery] Created cluster-info discovery client, requesting info from “”
[discovery] Failed to request cluster info, will try again: [Get dial tcp connect: no route to host]
[discovery] Failed to request cluster info, will try again: [Get dial tcp connect: no route to host]

Disable firewalld using below command

systemctl disable firewalld

I have published my application blueprint in Oracle Ravello Repo and if you need you can copy it to your library. Here it is.

Article Short Link:

If You Found This Post As Useful Please Rate The Post And Share It!

Click to rate this post!
[Total: 14 Average: 5]

Leave a Reply

Your email address will not be published. Required fields are marked *