Actions90
- Namespaces Actions
- Pods Actions
- Services Actions
- Deployments Actions
- ReplicaSets Actions
- StatefulSets Actions
- DaemonSets Actions
- Jobs Actions
- CronJobs Actions
Deployments → Exec
AI-generatedOverview
This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources, specifically supporting the 'Exec' operation for executing commands inside a container of a deployment. It is useful for scenarios where you need to run commands directly inside a container for debugging, maintenance, or automation purposes. For example, you can execute shell commands inside a container of a deployment to inspect logs, modify files, or run scripts without needing direct access to the Kubernetes cluster.
Use Case Examples
- Executing a shell command inside a container of a deployment to check application status.
- Running a diagnostic command inside a container to troubleshoot issues without redeploying.
Properties
| Name | Meaning |
|---|---|
| Image | The container image to use, relevant for operations like run, restart, exec, and patch. |
| Namespace | The Kubernetes namespace where the deployment resides. |
| Resource Name | The name of the deployment resource to target. |
| Container Name | The name of the container inside the deployment where the command will be executed. |
Output
JSON
stdout- The standard output from the executed command inside the container.
Dependencies
- Requires Kubernetes API credentials to authenticate and interact with the Kubernetes cluster.
Troubleshooting
- Ensure Kubernetes credentials are correctly configured; missing credentials will cause errors.
- Resource name is mandatory for the exec operation; omitting it will throw an error.
- The command must be provided as an array; otherwise, an error is thrown.
- Container name defaults to 'main-container' but must match an existing container in the deployment to avoid execution failures.
Links
- Kubernetes Exec Command Documentation - Official Kubernetes documentation on executing commands inside containers.