cldkctl console
The console command allows you to execute commands inside a running container of a Kubernetes pod. This is useful for debugging or inspecting the state of your containerized application directly from the terminal. It opens an interactive shell session or executes a specific command within a container of a running pod — similar to running: kubectl exec -it <pod-name> -- /bin/sh
Usage
cldkctl console [pod name] [flags]Steps
Follow the steps below to run and view the result of this command:
Retrieve the list of running pods in your project to identify the target pod name.
./cldkctl get podRun the console command with the desired pod name:
./cldkctl console [pod-name]Specify the container name if the pod has multiple containers:
./cldkctl console [pod-name] --container [container-name]Define the namespace if the pod is in a non-default namespace:
./cldkctl console [pod-name] --namespace [namespace-name]Once executed, the CLI opens an interactive terminal session inside the container. You can run shell commands directly from within the container environment.
Flags
-c, --container string
Specify the container name (default: the first container in the list).
-h, --help
Help for the console command.
-n, --namespace string
Specify the Kubernetes namespace to scope the operation.
-p, --project string
Specify the project ID.
Last updated
