IBM CloudPak for Data: Difference between revisions

From Wiki
Jump to navigation Jump to search
Line 19: Line 19:
After starting the container, log in to OpenShift using '''cpd-cli'''.
After starting the container, log in to OpenShift using '''cpd-cli'''.


The OpenShift token can be found in the <code>env.sh</code> file. You can either export it as <code>OCP_TOKEN</code> or copy and paste it directly into the command.
Provide the following command:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
./cpd-cli manage login-to-ocp --token=sha256~xxxxxxxxxxxxxxxxxxxxxxxx --server=https://api.cluster.example.com:6443
./cpd-cli manage login-to-ocp --token=sha256~xxxxxxxxxxxxxxxxxxxxxxxx --server=https://api.cluster.example.com:6443
</syntaxhighlight>
</syntaxhighlight>
This login is stored by '''cpd-cli''' inside the running container and is separate from a standard <code>oc login</code> session.


= Veja também=
= Veja também=

Revision as of 21:10, 29 July 2026

Getting an OpenShift Login Token

You can obtain your OpenShift API token from the OpenShift web console:

  1. Log in to the OpenShift console.
  2. Click your username in the upper-right corner.
  3. Select Copy login command.
  4. Authenticate again if prompted.
  5. Copy the token from the displayed oc login command.

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.

Provide the following command:

./cpd-cli manage login-to-ocp --token=sha256~xxxxxxxxxxxxxxxxxxxxxxxx --server=https://api.cluster.example.com:6443

Veja também