High Availability Kubernetes Using RKE in Cloud Raya Part 3

How can we help?
< All Topics

High Availability Kubernetes Using RKE in Cloud Raya Part 3

After Kubernetes and rancher is ready, we can continue to create simple application run on our Kubernetes Cluster
Please login to Rancher WEB UI using URL https://rancher.cloudraya.com

Create Project in Rancher

Click Cluster Name, for this application we choose local then click Add Project button

Insert the project name with the name Website then click Create

Add Namespace

Select Website project then we create a namespace which application will be deployed.
Click Add Namespace button then Insert Name with nginx-ns

Click the dashboard then Choose Project Website

Click the Deploy button on the right side to deploy a simple application.

Fill the value as the following screenshot
Name: nginx
Docker Image: nginx
Namespace: nginx-ns
Port Mapping:
    Port Name: nginx
    Public the container port: 80
    Protocol: TCP
“As a” : NodePort
Then click Launch

Let’s monitor until deployment status is Active

After deployment is successful, the Nginx application is using port 30350. In the next step, we will add this port to the Load Balancer in Cloudraya

Add Port to Load Balancer

Create Load balancer with Name nginx with Public Port 80 and the Private Port 30350

Edit nginx Load Balancer to assign All nodes

Edit nginx Load balancer then assign all nodes to the LB

Add all nodes to the Load Balancer, we can access the Nginx using the IP Address of Load Balancer at

Scaling pod using Rancher is very simple. We only need to click the plus button on the right side

After a while, we will see 2 dots under Active that means the nginx already has 2 pods

Also, we can verify it using kubectl command. Please run the command below to verify the pods

# kubectl get pods

We can see the Rancher and kubectl command has the same result.

Add Helm Repository through Rancher

Helm is Package Manager of Kubernetes like apt and yum. We can add the repository then choose the application that you would like to be installed. Click Apps then choose Manage Catalogs.

After that, we will see the default three repositories of rancher

Click Add Catalog button to add the repository. In this tutorial, we will add the Bitnami Helm repository
Name: Bitnami
Catalog URL: https://charts.bitnami.com/bitnami
Helm Version: Helm v3

Then click Create

After Bitnami Repository has been added, we can continue to deploy the application.

Deploy / Launch Apache from Helm Repository

We will deploy apache in the Kubernetes cluster. Click the Launch Button the search Apache

On the new windows screen, we will see many applications on Kubernetes. Just type apache the click the apache to continue the deployment

Fill the field as follow :
Name: apache
Namespace: apache
Then Click the Launch button

Click Apps to see the status of apache deployment

Let’s find the service port of the apache using kubectl in the apache namespace

# kubectl get svc -n apache

In here, we get port 30560 that we can set on the Load Balancer of Cloudraya. Add new Load Balancer configuration as follow

Then assign all nodes to this Load Balancer IP Address. Verify the apache deployment by accessing the website using the URL

Finally, we are successfully installing Kubernetes and deploying a simple application Nginx and apache in Cloudraya.
Please feel free to submit your question to our Support if you need more assistance.

Missed something? You can always re-read the article part 1 and part 2. Ready to have your High Availability in Kubernetes Using RKE? Try it in Cloud Raya now, Sign up here.

Table of Contents

Comments are closed.

Ready, Set, Cloud

Ready, Set, Cloud