⬅️ Back to the OpenShift overview
To connect to the cluster, we recommend using oc or kubectl; the latter works for most features we're going to use here, but oc is obviously the more appropriate given this courses scope.
You can get the oc CLI distribution (which also includes kubectl) from RedHat directly, e.g. from the OKD project's website.
Once you have that installed, you can authenticate to the cluster. With the credentials you've been given:
- go to the web console
- click your username in top right corner
- click "Copy login command"
- confirm your credentials for security purposes
- click "Display token"
- copy the command like
oc login --token=sha256~abcdef,,, --server=https://api.the-cluster.ch:6443 - you should now be authenticated and authorized; confirm by running some command as
oc get pods --all-namespaces - since by default, you're connecting to the
defaultnamespace (equivalent to a project), switch to your own in which you have most permissions:oc project <your-username> - confirm your write permissions by following the steps in oc-basics.md