Kubernetes icon

Kubernetes

Interact with Kubernetes

CronJobs → Exec

AI-generated

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources, specifically supporting the 'Exec' operation for CronJobs in this context. It allows executing commands inside a container of a specified CronJob resource within a Kubernetes namespace. This is useful for running diagnostic commands, debugging, or managing the state of containers in CronJobs without needing direct access to the Kubernetes cluster.

Use Case Examples

  1. Executing a shell command inside a container of a CronJob to check its status or logs.
  2. Running a custom script inside a CronJob container to perform maintenance tasks.

Properties

Name Meaning
Image The container image associated with the resource, used in some operations like running a pod.
Namespace The Kubernetes namespace where the CronJob resource is located.
Resource Name The name of the specific CronJob resource to operate on.
Container Name The name of the container inside the CronJob 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 that the Kubernetes credentials provided are valid and have sufficient permissions to execute commands inside the specified CronJob container.
  • Verify that the resource name and namespace are correct and that the CronJob exists in the cluster.
  • The 'command' property must be a valid JSON array; otherwise, the node will throw an error.
  • If the container name is incorrect or the container does not exist in the CronJob, the exec operation will fail.

Discussion