IBM CloudPak for Data: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Getting an OpenShift Login Token == You can obtain your OpenShift API token from the OpenShift web console: # Log in to the OpenShift console. # Click your username in the upper-right corner. # Select '''Copy login command'''. # Authenticate again if prompted. # Copy the token from the displayed <code>oc login</code> command. Example: <syntaxhighlight lang="bash"> oc login --token=sha256~xxxxxxxxxxxxxxxxxxxxxxxx --server=https://api.cluster.example.com:6443 </synt..." |
|||
| Line 14: | Line 14: | ||
oc login --token=sha256~xxxxxxxxxxxxxxxxxxxxxxxx --server=https://api.cluster.example.com:6443 | oc login --token=sha256~xxxxxxxxxxxxxxxxxxxxxxxx --server=https://api.cluster.example.com:6443 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Logging in to OpenShift with cpd-cli == | == Logging in to OpenShift with cpd-cli == | ||
Revision as of 21:09, 29 July 2026
Getting an OpenShift Login Token
You can obtain your OpenShift API token from the OpenShift web console:
- Log in to the OpenShift console.
- Click your username in the upper-right corner.
- Select Copy login command.
- Authenticate again if prompted.
- Copy the token from the displayed
oc logincommand.
Example:
oc login --token=sha256~xxxxxxxxxxxxxxxxxxxxxxxx --server=https://api.cluster.example.com:6443
Logging in to OpenShift with cpd-cli
After starting the container, log in to OpenShift using cpd-cli.
The OpenShift token can be found in the env.sh file. You can either export it as OCP_TOKEN or copy and paste it directly into the command.
./cpd-cli manage login-to-ocp --token=sha256~xxxxxxxxxxxxxxxxxxxxxxxx --server=https://api.cluster.example.com:6443
This login is stored by cpd-cli inside the running container and is separate from a standard oc login session.