Loading Posts...

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

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

Enable docker

Add the Kubernetes repo

Turn off selinux

Set the selinux status to permissive, it prints warnings only

Install Kubernetes Components

Configure sysctl

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

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

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 10.0.0.3:6443 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 “10.0.0.3:6443”
[discovery] Created cluster-info discovery client, requesting info from “https://10.0.0.3:6443”
[discovery] Failed to request cluster info, will try again: [Get https://10.0.0.3:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: dial tcp 10.0.0.3:6443: connect: no route to host]
[discovery] Failed to request cluster info, will try again: [Get https://10.0.0.3:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: dial tcp 10.0.0.3:6443: connect: no route to host]

Disable firewalld using below command

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: https://tcrum.net/KubernetesOnRavello

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

Deploy Kubernetes Cluster On Oracle Ravello with CentOS 7
5 (100%) 14 vote[s]

Aruna Lakmal

Associate Technical Lead at Pearson, Sri Lanka. Technology junky, enthusiast, a VMware vExpert and a blogger with more than 6 years of Experience in Information Technology more focusing on VMware Virtualization, Microsoft and Datacenter Technologies.

Get Updates Directly To Your Inbox!

   

Leave a Reply

Loading Posts...