Editing
Tutorials:Set up your Kubernetes user account
(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!
== Enter the CCU context == You should now be able to enter the CCU context with your username and the namespace "testing" set up in the kubeconfig file as follows: <syntaxhighlight lang="bash"> > kubectl config use-context me@ccu </syntaxhighlight> Try it out: <syntaxhighlight lang="bash"> > kubectl get pods </syntaxhighlight> You are not in a valid namespace corresponding to your user groups yet, so will get an error which should look like this: <syntaxhighlight lang="bash"> Error from server (Forbidden): pods is forbidden: User "https://ccu.uni-konstanz.de:32000/dex#your.username" cannot list resource "pods" in API group "" in the namespace "testing" </syntaxhighlight> '''For testing purposes, all current users have access to the namespace exc-cb which has access to the DGX-2 (hostname vecna). This will change in the future, watch out for the documentation below.''' To switch to a different namespace, edit the corresponding line in the kubeconfig. You can also keep a list of contexts for different namespaces and users like this. Choose whatever names you would like for your contexts. <syntaxhighlight lang="bash"> contexts: - context: cluster: ccu namespace: exc-cb user: your.username name: me@exc-cb.ccu - context: cluster: ccu namespace: trr161 user: your.username name: me@trr161.ccu </syntaxhighlight> Set the new context, and now you should be able to list the pods. Note that all subsequent kubectl commands now refer to the namespace exc-cb. This is equivalent to specifying "kubectl -n exc-cb" on the command line. You can still override it by issuing "kubectl -n other_namespace" manually. <syntaxhighlight lang="bash"> > kubectl config use-context me@exc-cb.ccu > kubectl get pods # list the pods in another namespace instead > kubectl -n trr161 get pods </syntaxhighlight>
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
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