Red Hat OpenShift: Difference between revisions
From wiki.vacula.xyz
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== Commands == | == Commands == | ||
{| class="wikitable" | |||
|+ | |||
!Command | |||
!Used for... | |||
!Notes | |||
|- | |||
|oc whoami | |||
|See who you are logged in as | |||
| | |||
|- | |||
|oc login | |||
|Log in to the cluster | |||
|Defaults to using a web login, but user/pass can be provided over the command line | |||
|- | |||
|oc new-project | |||
|Create a new project (namespace) | |||
| | |||
|- | |||
|oc describe | |||
|Get detailed information on a resource '''''instance''''' | |||
| | |||
|- | |||
|oc explain | |||
|Get documentation on a resource '''''object''''' | |||
| | |||
|- | |||
|oc api-resources | |||
|Get a list of all API resources | |||
| --api-group can be used to limit to certain API groups | |||
|- | |||
|oc adm top | |||
|Get resource usage on pods and similar | |||
| --sum will show a sum of resource usage | |||
|} | |||
== Important Resource Types == | == Important Resource Types == | ||
* statefulset | * statefulset | ||
* replica | * replica | ||
{| class="wikitable" | |||
|+ | |||
!Resource | |||
!Description | |||
!Useful for... | |||
!OS Only? | |||
|- | |||
| | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
| | |||
| | |||
|} | |||
=== Anki Questions === | === Anki Questions === | ||
# What is <resource>? | |||
# What command should be used to <action>? | |||
# Where is <resource> useful compared to similar ones? | |||
Revision as of 14:00, 4 August 2026
Commands
| Command | Used for... | Notes |
|---|---|---|
| oc whoami | See who you are logged in as | |
| oc login | Log in to the cluster | Defaults to using a web login, but user/pass can be provided over the command line |
| oc new-project | Create a new project (namespace) | |
| oc describe | Get detailed information on a resource instance | |
| oc explain | Get documentation on a resource object | |
| oc api-resources | Get a list of all API resources | --api-group can be used to limit to certain API groups |
| oc adm top | Get resource usage on pods and similar | --sum will show a sum of resource usage |
Important Resource Types
- statefulset
- replica
| Resource | Description | Useful for... | OS Only? |
|---|---|---|---|
Anki Questions
- What is <resource>?
- What command should be used to <action>?
- Where is <resource> useful compared to similar ones?