Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with Kubernetes clusters, specifically supporting operations on various Kubernetes resources including ReplicaSets. For the 'exec' operation on ReplicaSets, it allows executing commands inside the pods of the ReplicaSet. This is useful for running diagnostic commands, debugging, or managing the state of containers within the ReplicaSet. For example, a user can execute a shell command inside a pod to inspect logs or modify configurations dynamically.

Use Case Examples

  1. Executing a shell command inside a pod of a ReplicaSet to check application logs.
  2. Running a diagnostic command inside a container to troubleshoot issues without redeploying.

Properties

Name Meaning
Image The container image to use when running or restarting pods, or when executing commands inside pods.
Namespace The Kubernetes namespace where the ReplicaSet resource is located.
Resource Name The name of the ReplicaSet resource on which the operation (exec) will be performed.

Output

JSON

  • stdout - The standard output from the executed command inside the pod.

Dependencies

  • Requires Kubernetes API credentials to authenticate and interact with the Kubernetes cluster.

Troubleshooting

  • If no credentials are provided or credentials are invalid, the node throws an error 'No credentials got returned!'. Ensure valid Kubernetes API credentials are configured.
  • If the 'command' parameter is not an array, the node throws an error 'Command must be an array!'. Provide the command as a JSON array of strings.
  • Ensure the specified namespace and resource name exist in the Kubernetes cluster to avoid resource not found errors.

Discussion