Kubernetes
This tutorial is part of the Cloud Expert Series.
Back to Cloud ExpertCategory: Advanced
Difficulty: 3 out of 5
Duration: 60 minutes
Find a mistake? Let us know the issue here.
Overview
This tutorial will show you how to use Kubernetes on the Nectar Research Cloud.
What you’ll learn
- Create a Kubernetes cluster using Magnum
- Administer your newly created Kubernetes cluster
- Create a service using Pods
- Use a ReplicaSet for High Availability
- Scale your cluster
- Create a Gateway to allow external access to your service
What you’ll need
- A Nectar project with at least the Standard Bundle
- Set up the OpenStack Command Line Tool - Tutorial
- python-openstackclient
- python-heatclient
- python-magnumclient
- kubectl
kubectl version skew policy
kubectl is officially supported within one minor version (older or newer)
of kube-apiserver. If your cluster is running 1.21.1 you should use a kubectl
between 1.20 and 1.22. See the k8s version skew policy here.
Magnum
Magnum is the project for the Container Orchestration Engine (COE) Service in OpenStack. In the Nectar context, the only COE framework that is tested and supported is Kubernetes, so this tutorial will only cover topics that are related to Kubernetes.
Openstack resources in Magnum
Do not make manual changes in OpenStack to any resources created or managed
by Magnum. Changes should be performed either using Magnum CLI commands or
within the Nectar Dashboard to ensure long-term stability and compatibility.
Direct modifications to Magnum infrastructure components in OpenStack can
destabilise your cluster, prevent future updates from applying, and introduce
critical errors. Support for clusters containing unauthorised manual
modifications is limited, and we may be unable to assist with issues arising
from such changes.
Kubernetes Tutorial
Kubernetes has an extensive documentation site, which covers many of the concepts that we will be covering, often in greater depth than we do here.
The purpose of this tutorial is not to replace Kubernetes documention. Rather we aim to show you how to quickly set up a Kubernetes cluster on the Nectar Research Cloud, and how to integrate Kubernetes with native OpenStack services like Cinder.
This tutorial uses the Openstack command-line tools rather than the “Project > Container Infra” dashboard panels.