Actions54
- Namespace Actions
- Deployment Actions
- Service Actions
- Pod Actions
- StatefulSet Actions
- ConfigMap Actions
- Secret Actions
- Job Actions
- CronJob Actions
- Node Actions
- Workload Actions
Overview
The node allows executing a command inside a specific container of a Kubernetes Pod managed via Rancher. This is useful for running diagnostic commands, debugging, or interacting with the pod's environment without needing to SSH into the underlying host or use external tools.
Common scenarios include:
- Running shell commands inside a pod to inspect logs, files, or environment variables.
- Executing scripts or utilities dynamically during workflows.
- Performing maintenance or configuration tasks on running containers.
For example, you might execute ls /var/log
inside a pod to list log files or run a custom script to gather metrics.
Properties
Name | Meaning |
---|---|
Cluster Name or ID | Select the Kubernetes cluster where the pod resides. |
Project Name or ID | (Optional) Select the project within the cluster. |
Namespace Name or ID | (Optional) Select the namespace containing the pod. |
Pod ID | The identifier of the pod in which to execute the command. |
Command | The command string to execute inside the pod's container. |
Container | (Optional) The name of the container inside the pod to target. If not specified, the first container is used. |
Output
The output JSON contains the result of the executed command inside the pod. It typically includes the command's standard output and possibly other metadata depending on the Rancher/Kubernetes API response.
If the node supports binary data output for this operation, it would represent the raw output stream from the command execution, but based on the static code analysis, only JSON output is indicated.
Dependencies
- Requires access to a Rancher-managed Kubernetes cluster.
- Needs an API authentication credential configured in n8n to interact with the Rancher/Kubernetes API.
- The node depends on Rancher's API endpoints for pods and exec operations.
Troubleshooting
- Invalid Pod ID: Ensure the Pod ID is correct and exists in the selected cluster/namespace.
- Command Execution Failure: The command may fail if it is invalid or not available in the container's environment.
- Container Not Found: If specifying a container name, verify it exists in the pod; otherwise, omit to default to the first container.
- Authentication Errors: Confirm that the API credentials are valid and have sufficient permissions to execute commands in pods.
- Timeouts or Network Issues: Network connectivity to the Rancher API or Kubernetes cluster must be stable.
Links and References
- Kubernetes Exec API
- Rancher API Documentation
- n8n Expressions Documentation (for dynamic property values)