Getting started with CloudFerro cloud on CREODIAS: the basics of using Kubernetes

Many modern software applications are built as microservices and run as containers deployed using Kubernetes as an orchestrator. On CREODIAS, Kubernetes clusters can be provisioned as a service built on top of OpenStack Magnum project. 

Introduction to OpenStack Magnum container orchestration engine 

Magnum is an OpenStack component that enables users to benefit from a Kubernetes container orchestration engine integrated within an OpenStack-based cloud. It provides a standardized API for cluster management, integrated with other OpenStack services. Magnum offers complete lifecycle management for Kubernetes clusters while ensuring multi-tenant security through Keystone integration. 

On CREODIAS platform, the Magnum service is configured to manage multiple clusters of each tenant. You can access it both with a Horizon GUI and with the OpenStack command line interface. 
To find Magnum on CREODIAS, go to the OpenStack Horizon dashboard under the "Container Infra" section: 

  1. Log in to your CREODIAS hosting account with the Horizon interface 
  1. In the OpenStack dashboard, navigate to the "Container Infra" section 
  1. Click on "Clusters" under the "Container Infra" menu 

If you prefer using a command line interface, please follow this document: How To Install OpenStack and Magnum Clients for Command Line Interface to CREODIAS Horizon.

Creating Kubernetes cluster on CREODIAS 

Creating a Kubernetes cluster on CREODIAS from the Horizon GUI is straightforward and requires minimal configuration. A guide that walks you through this process is described in the document How to Create a Kubernetes Cluster Using CREODIAS OpenStack Magnum.

Provisioning a cluster requires deploying several cloud resources: networking infrastructure, virtual machines and other components. The total time of cluster creation will usually take you several minutes and can vary depending on the chosen flavors and number of nodes. All in all, it is a completely automated process that is significantly faster than deploying virtual machines and installing a Kubernetes distribution manually. 

Recommendations for clusters configuration 

Simplest cluster 

With Magnum the simplest cluster that you can create consists of one control plane node plus one worker node. 

Control plane size 

While you can use a single node for Control Plane, this is not a recommended solution for production scenarios and large workloads. If you assume your cluster to be production-ready, create it with 3 or more control plane nodes. 

Control plane flavors 

We can tell from our experience that the best flavors for control plane nodes for production scenarios are those where fast local-storage is attached (hmd.* at WAW3-1, hmad.* at WAW3-2 and hmd.* at FRA1-2).  

When using local storage flavors, you should use a dedicated “localstorage” cluster template and enter an extra label when creating the cluster.  For more information about this aspect, refer to the document Default Kubernetes cluster templates in Creodias Cloud  

Worker nodes 

There is no general rule of thumb for choosing worker node flavors, it depends solely on your applications’ requirements.  

Define if your deployments have a static or variable load. In the case of the latter, e.g. when running periodic jobs with significant spikes in resource utilization, you can benefit from a cluster auto-scaler, which automatically adjusts the number of worker nodes, allowing to optimize costs.  

More information about auto-scaling is covered in the document: "Autoscaling Kubernetes Cluster Resources on CREODIAS OpenStack Magnum   

With Magnum you are not limited to a single flavor for worker nodes in a cluster. Using nodegroups you can build a more advanced cluster with various flavors provided for different functions. 

 For reference, see: Creating Additional Nodegroups in Kubernetes Cluster on CREODIAS OpenStack Magnum 

Accessing your Kubernetes cluster 

When your cluster is ready, you can start scheduling your pods, jobs, services and many more Kubernetes resources. The most popular utility for interacting with your cluster is a kubectl command line interface. To start using it on CREODIAS, see the reference guide:  How To Access Kubernetes Cluster Post Deployment Using “kubectl” command on CREODIAS OpenStack Magnum 

 An important aspect is observability of the state of your cluster. One of the tools that support this is the standard Kubernetes dashboard. This guide provides reference for using it with your cluster: Using Dashboard To Access Kubernetes Cluster Post Deployment On CREODIAS OpenStack Magnum

Final thoughts for this mini guide 

Kubernetes Ingress  

Kubernetes ingress is a useful utility that allows you to handle complex routing and load-balancing scenarios of your microservice-based deployments. You can use the built-in nginx ingress controller available during cluster creation or bring your own one. To learn more about the Ingress feature, follow the document Using Kubernetes Ingress on CREODIAS OpenStack Magnum

Storage for data persistency 

Often our applications or systems need persistency e.g. as a backing store for a database, storing files with processing results, etc. Depending on the details of the use case, such persistency can be provided in various forms using combination of OpenStack and Kubernetes mechanisms. We suggest starting to explore this aspect with the “Knowledge base” articles listed below:  

Authors: Mateusz Ślaski, Sales Support Engineer at CloudFerro; Paweł Turkowski, Product Manager at CloudFerro.