Kubernetes access

The IMAXT platform runs in a Kubernetes (K8s) cluster. Kubernetes schedules Docker containers in the cluster.

With direct access to the Kubernetes cluster you can schedule pods (Docker images) directly in the cluster to run any workload or provide a service. A few examples:

  • Serve machine learning models. A container can serve a ML model and make it available to all users (or externally).
  • Run analysis on datasets using specific software available in the container.
  • Expose a service, e.g., cirrocumulus and access the web interface.
  • Access the remote desktop environment in your Jupyter server using VNC.

Requirements

In order to interact with Kubernetes you need the kubectl executable in your path. In most of the distributions you just need to install kubectl.

A full tutorial on using kubectl is out of scope in this documentation but we will describe the most important commands in this and following sections.

Note

The user interacts with the cluster from their own laptop’s terminal. I.e. not from a Jupyter terminal.

Install access certificate

In order to access the cluster, users first need to obtain a security certificate. To do that, login in the IMAXT platform and under Profile find the Access Cluster section and download the certificate.

The certificate should be stored in one of two places:

  • $HOME/.kube/config
  • Any other location defined in the environment variable KUBECONFIG.
Warning

This certificate allows direct access to the K8s cluster. The file should have restrictive permissions so that other users cannot read it (e.g. chmod 0700 ~/.kube/config).

Validate access

Check that you access the cluster with e.g.

kubectl get pods
No resources found in users-eglez namespace.
Note

Due to security measures the access to the cluster is behind a firewall. Cambridge users should be in the University network (e.g. VPN). In case you get a connection refused error contact admin.