Use automatic Kubernetes token injection
Use the Kubernetes user token that is automatically injected into workspace containers to run kubectl and kubectl commands against the Kubernetes cluster without explicit login.
| The automatic token injection currently works only on the OpenShift infrastructure. |
Prerequisites
-
You have a running instance of Eclipse Che.
Procedure
-
Open the Che dashboard and start a workspace.
-
After the workspace starts, open a terminal in the workspace container.
-
Run
kubectlorkubectlcommands to deploy applications, inspect and manage cluster resources, or view logs. The injected Kubernetes user token authenticates these commands automatically.
