Kubernetes icon

Kubernetes

Interact with Kubernetes

Services → Exec

AI-generated

Overview

This node interacts with Kubernetes services, specifically executing commands inside containers of Kubernetes services. It is useful for running commands directly within a container of a service in a Kubernetes cluster, such as debugging, configuration, or maintenance tasks. For example, you can execute shell commands inside a container to inspect logs, modify files, or run scripts without needing to SSH into the host machine.

Use Case Examples

  1. Executing a shell command inside a container of a Kubernetes service to check the status of an application.
  2. Running a script inside a container to update configuration or environment variables dynamically.

Properties

Name Meaning
Image The container image associated with the service (used in some operations).
Namespace The Kubernetes namespace where the service is located.
Resource Name The name of the Kubernetes service resource to operate on.
Container Name The name of the container inside the service 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 and accessible; otherwise, the node will throw a 'No credentials got returned!' error.
  • The 'Resource Name' parameter is mandatory for the exec operation; missing it will cause an error.
  • The 'command' parameter must be a valid JSON array; otherwise, the node will throw a 'Command must be an array!' error.
  • If the container name is incorrect or the container does not exist in the service, the exec command will fail.

Discussion