Editing
CCU:GPU Cluster Quick Start
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Log in to the cluster and configure kubectl == You first need a working version of kubectl on your system. The cluster runs Kubernetes 1.31.4, the version of kubectl should match this. Check out installation instructions in the [https://kubernetes.io/docs/tasks/tools/install-kubectl/ official Kubernetes documentation]. The login page to the cluster is [https://ccu-k8s.inf.uni-konstanz.de here]. Enter your credentials, you will get back an authorization token. Click on "full kubeconfig" on the left, and copy the content of this to a new file named ".kube/config" in your home directory. Note that the default namespace still has the template name "user-<firstname>-<lastname>". Replace this text with your username, so that your kubeconfig looks like this: <syntaxhighlight> apiVersion: v1 kind: Config preferences: {} current-context: ccu-k8s contexts: - name: ccu-k8s context: user: your.name cluster: ccu-k8s.inf.uni-konstanz.de namespace: user-your-name clusters: - name: ccu-k8s.inf.uni-konstanz.de cluster: server: https://ccu-k8s.inf.uni-konstanz.de:7443 certificate-authority-data: LS0tLS1C ... <many more characters> insecure-skip-tls-verify: false users: - name: your.name user: auth-provider: config: idp-issuer-url: https://ccu-k8s.inf.uni-konstanz.de:31000/dex client-id: loginapp id-token: eyJhbGciOiJSU ... <many more characters> client-secret: 4TORGiNV9M54BTk1v7dNuFSaI6hUjfjq <many more characters> refresh-token: ChlveGR ... name: oidc </syntaxhighlight> The namespace "user-your-name" is your personal namespace within the Kubernetes cluster, and (so far) the only one you have access to. Conversely, no one else can access resources within your namespace. The kubeconfig above will make sure that all kubectl commands use your private namespace by default. Test your connection to the cluster now by running <syntaxhighlight> > kubectl config use-context ccu-k8s > kubectl get pods No resources found in namespace user-your-name. </syntaxhighlight> It is now time to create your first pod, which is a wrapper for one or more containers to run on the cluster. You might also want to become more familiar with the "kubectl" command at some point, check out the [https://kubernetes.io/docs/reference/kubectl/cheatsheet/ kubectl cheat sheet]. A very good idea is to install bash autocompletion for kubectl, which is the very first tip on that page. '''Note 1:''' There will very likely be occasions where your login credentials become invalid - they might time out, services might have been updated, certificates have been renewed, etc. In this case, please login again and update your kubeconfig with the new credentials. You then only need to update the block with your user data. If this still does not work, please report immediately, as there might be a problem with the login services. '''Note 2:''' It is not supported to store separate credentials on two different computers. What will happen in this case is that one of them will consume the refresh token, which will then become invalid on the other one. If you need to access the cluster from a second computer, it is advised to use a ssh connection to your primary one where you store the credentials.
Summary:
Please note that all contributions to Collective Computational Unit may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
CCU:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Project page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Collective Computational Unit
Main page
Projects
Tutorials
GPU Cluster
Core Facilitys
Mediawiki
Recent changes
Random page
Help
Tools
What links here
Related changes
Page information