The Nectar Container Orchestration Engine (COE) service provides support for provisioning Kubernetes clusters as a service on the Nectar Research Cloud using OpenStack Magnum. This allows a user to spin up a container cluster (Kubernetes) on Nectar Research Cloud.
Currently only Kubernetes as a Container Orchestration Engine is supported. For a tutorial on how to create a Kubernetes cluster, please visit the Kubernetes Tutorial.
To spin up a Kubernetes container cluster, you need quotas for the following resources:
- Clusters - 1 per cluster that you want to run
- Floating IPs - 2 per cluster
- Load balancers - 3 per cluster
- Networks - 1 per cluster
- Instances - at least 2 per cluster
There is a step by step tutorial available to teach you how to create a Cluster. Please visit the Nectar Tutorial Website.
Creating a Cluster
You can create a cluster using either the Dashboard or CLI tools.
Using Dashboard
- Log on to the Nectar Dashboard
- Navigate to Container Infra.
- Click on Clusters, then Create Cluster. This will open the Create dialog
- On the Info tab, give your cluster a name and choose a cluster template.
We have pre-defined global templates (in format kubernetes-{az}-{version}) to help you get started.
Choose the template that you want your cluster to be in. - On the Misc tab, make sure you select your Keypair.
- Click Submit.
Using CLI
Install python-magnumclient. You need python-magnumclient >= 2.9.0
pip install python-magnumclient
- Boot a cluster
openstack coe cluster create --cluster-template kubernetes-melbourne-v14.6 \
--keypair <mykey> mycluster
Operating your Cluster
Once your cluster is up (NOTE: It takes about 20 mins for a cluster to build),you can control it using kubectl.
- Install kubectl
- Set up the credentials to connect to the cluster. Firstly, create an configdir
mkdir ~/kubernetes/
cd ~/kubernetes/
- Create the config files
openstack coe cluster config mycluster
- Set the ENV by copying the output from the previous command
export KUBECONFIG=$HOME/kubernetes/config
- Use kubectl to connect to it
kubectl get all
Operating your Cluster using web interface
Alternatively, you can also administer it from the web.
- Set up a role for the service account
kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
- List the secrets
kubectl -n kube-system get secret
- Get the secret token. It will be in format kubernetes-dashboard-token-XXXXX
kubectl -n kube-system describe secret kubernetes-dashboard-token-XXXXX
- Copy the token
- Start the web interface
kubectl proxy
- In your browser, go to the following URL
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login
- Use your token to log in
Tips
Availability Zone
You can boot in a different availability zone by using --labels
. E.g.
openstack coe cluster create --cluster-template mytemplate \
--keypair <mykey> --labels availability_zone <AZ> mycluster