Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document guides the cloud users how to create a kubernetes cluster and deploy a simple application.

Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications.


Table of Contents


Step 1. Create a Kubernetes (k8s) cluster

...

Code Block
languagebash
themeMidnight
titleSetup the k8s connectionopenstep rc
linenumberstrue
# the name of the rc file will reflect your project name. In this case, the project name is 'spherex'
> source spherex-openrc.sh  # this will ask for a password. Use the same password that yo use for the dashboard.
# The rc file need to be loaded before you use openstack cli tools.

...

Code Block
languagebash
themeMidnight
firstline1
titleInstalling openstack cli toolssetup kube config
linenumberstrue
# somehow, openstack cli packages from ubuntu does not work. Instead, we install them via pip command.
> sudo apt-get install python-dev python3-pip # install pip
> sudo pip install python-openstackclient python-magnumclient
# now it's time to fetch the kube config for your cluster
> openstack coe cluster config YOUR-K8S-CLUSTER-NAME
# The above command will create a file named "config" under the current directory. This is basically a kube config file that you can use with kubectl command.
# You may environment variable of "KUBECONFIG" to this file, as suggested by the above command. You may instead copy this file under "~/.kube"

...

Step 3. Setup Storage class

  • Kubernetes on the Openstack Container Platform platform is capable of provisioning persistent volumes (PVs) using the Container Storage Interface (CSI) driver for OpenStack Cinder. To use this, you need to create a StorageClass object.

...