The Nectar Container Orchestration service provides support for provisioning Kubernetes clusters as a service on the Nectar Research Cloud using OpenStack Magnum (Container Infrastructure as a Service). This allows a user to spin up a container cluster (kubernetes) on Nectar. Please note that the Container Orchestration Service is currently in Beta version. We are seeking your feedback for this service. Please provide your feedback by emailing support@ehelp.edu.au


To spin up a Kubernetes container cluster, you need to do the following:

  1.   Quotas for     
    • Floating IP
    • Network 
    • Subnet

If you have requested for floating IPs for your project, you will be fine. If not, request for floating ip quota.

  

Creating a Cluster

You can create a cluster using either the Dashboard or CLI tools.

Using Dashboard 

  1.  Log on to the Nectar Dashboard
  2.  Navigate to Container Infra.
  3.  Click on Clusters, then Create Cluster.  This will open the Create dialog
  4.  On the Info tab, give your cluster a name and choose a cluster template.
    We have pre-defined global templates (in format kubernetes-{az}) to help you get started.
    Choose the template that you want your cluster to be in.
  5.  On the Misc tab, make sure you select your Keypair.  
  6.  Click Submit.
      

Using CLI

  1.   Install python-magnumclient. You need python-magnumclient >= 2.9.0  

    pip install python-magnumclient

  2.   Create a template    openstack coe cluster template create --coe kubernetes \

    --image fedora-atomic-latest --external-network <floating-ip-network-id> \
    --master-flavor m2.xsmall --flavor m2.small --dns-nameserver 172.26.21.141 \
    --docker-storage-driver overlay --public mytemplate

      
  3.  Boot a cluster    

    openstack coe cluster create --cluster-template mytemplate \
    --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.

  1.   Install kubectl
      
  2.   Set up the credentials to connect to the cluster. Firstly, create an configdir

    mkdir ~/kubernetes/
    cd ~/kubernetes/

      
  3.   Create the config files    

    openstack coe cluster config mycluster

      
  4. 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

 

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