RKE on top of OpenStack

Deploy RKE as Kubernetes-as-services on top OpenStack Cluster

Btech Engineering
btech-engineering
4 min readFeb 17, 2023

--

RKE, Kubernetes, OpenStack

Intro

OpenStack

OpenStack is an open-source cloud computing platform that is designed to manage and control large pools of compute, storage, and network resources. It provides a complete infrastructure as a service (IaaS) solution that enables organizations to build and manage their own private, public, or hybrid cloud environments.

In addition to its flexibility and scalability, OpenStack is also highly customizable, allowing organizations to build their own cloud solutions that are tailored to their specific needs and requirements. With its open-source architecture and large, active community of contributors, OpenStack is a constantly evolving platform that continues to provide new features and capabilities to meet the changing needs of modern organizations.

RKE

“RKE is a CNCF-certified Kubernetes distribution that runs entirely within Docker containers. It solves the common frustration of installation complexity with Kubernetes by removing most host dependencies and presenting a stable path for deployment, upgrades, and rollbacks.”​

You can read more about rke on this article.

In this article, we’ll show you how to deploy rke on top OpenStack cluster, via rancher dashboard. OpenStack will be underlying VM for Kubernetes nodes(RKE), and for the provisioning automatically from rancher dashboard.

Scenario

Architecture RKE on Top of OpenStack

For this scenario we are using some specifications like this:

  • Rancher on K3s Cluster as RKE Deployer.
  • VM as k8s Master (4vCPu,8GB,20GB) -> OpenStack
  • VM k8s Worker (4vCPu,8GB,50GB) -> OpenStack

For this deployment, we can use Rancher built in K3s Cluster. Why we must deploy K3s cluster? Because Rancher as Deployer for RKE can’t stand alone on VM, Rancher must install on Kubernetes Cluster, and for alternative ways, we can use k3s cluster as Lightweight Kubernetes that we can install just on Docker Container.

Steps

Deploy K3s

To deploy rancher server you can follow this command

sudo docker run --name rancher-server -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:stable

Then access the dashboard, via http://<ip-server>/dashboard

Rancher Dashboard

Before installing RKE on OpenStack Cluster, we must install OpenStack as Cloud Providers. Select menu Provider -> Node Driver -> OpenStack -> Activate.

Install RKE

After installing OpenStack provides, we can install RKE. Select menu “Cluster Management” -> “Node templates” -> “Add Template” -> “Select OpenStack”, fill the form with information about OpenStack Cluster then click “Save”.

We need some information about OpenStack like, you can change values with your actual environment:

"authUrl": "https://api.openstack.net:5000/v3",
"availabilityZone": "Zone1",
"domainName": "Default",
"flavorName": "standard.2.1905",
"floatingipPool": "extern",
"imageName": "ubuntu-18.04-bionic-amd64",
"keypairName": "rancher",
"netName": "intern",
"sshPort": "22",
"sshUser": "ubuntu",
"tenantId": "616a8b01b5f94f99acd00a844f8f46c3",
"username": "user"

After that, switch to cluster -> add new cluster, fill form to create node-pool (master & worker).

Scroll down select version Kubernetes and network management, then click button create.

We can view on OpenStack dashboard, that RKE Component are created (K8s Master VM & K8s Worker VM)

On Rancher Dashboard we can view Cluster Status

Testing

We can deploy a deployment into RKE cluster via CLI and we can see the deployment via Rancher dashboard if the installation Successful.

Create Namespaces “apps” via Bastion RKE
Namespaces will show from rancher dashboard

Closing

Deploying Rancher Kubernetes Engine (RKE) on top of OpenStack provides organizations with a flexible and scalable solution for managing containerized applications. By leveraging the automation capabilities of RKE and the infrastructure resources of OpenStack, organizations can quickly deploy and manage Kubernetes clusters, while also benefiting from the advanced features of both technologies. With this integration, organizations can achieve greater agility, improved resource utilization, and better visibility and control over their containerized environments.

--

--

Btech Engineering
btech-engineering

Our mission is continuous learning and remember together is better.