Command Line

Access to Kubernetes using the command line

The login to Kubernetes is done through a command-line tool that forwards authentication to DFN-AAI, generating a corresponding token. You can log in using your university credentials.

To be able to use this tool, you need to install kubectl first:

sudo curl https://storage.googleapis.com/kubernetes-release/release/v1.24.0/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl
sudo chmod 755 /usr/local/bin/kubectl

The command-line tool itself, along with installation instructions, can be found here.

You will be redirected to a website where you have to log in to generate a token, which is automatically entered into ~/.kube/config by the script. In addition, the WWU Kube API servers for the respective WWU Kube clusters are automatically entered, each with its own context.

The commands to use one of these contexts are output at the end of the script. For example, kubectl config use-context wwukube-prod-ms1 can be used to activate the context for the productive cluster at Einsteinstraße.

The token is only valid for 24 hours, as it contains information that can only be renewed during the next login.