Changes

Jump to navigation Jump to search

CCU:GPU Cluster Quick Start

1,933 bytes added, 4 years ago
m
Log in to the cluster and configure kubectl
== Log in to the cluster and configure kubectl ==
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 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
'''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<syntaxhighlight>> kubectl get podsNo resources found in namespace .</syntaxhighlight>
'''Note 2:''' It is not supported now time to store separate credentials on two different computers. What will happen in this case create your first pod, which is that a wrapper for one of them will consume the refresh token, which will then become invalid or more containers to run on the other onecluster. If you need You might also want to access become more familiar with the cluster from a second computer"kubectl" command at some point, it check out the [https://kubernetes.io/docs/reference/kubectl/cheatsheet/ kubectl cheat sheet]. A very good idea is advised to use a ssh connection to your primary one where you store install bash autocompletion for kubectl, which is the credentialsvery 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.
== Create a pod to access the file systems ==

Navigation menu