Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, for the 'CronJobs' resource with the 'List' operation, it retrieves a list of CronJobs within a specified namespace. This is useful for monitoring, managing, or automating workflows involving Kubernetes CronJobs, such as scheduling batch jobs or periodic tasks in a Kubernetes environment.

Use Case Examples

  1. Listing all CronJobs in the 'default' namespace to monitor scheduled tasks.
  2. Retrieving CronJobs in a specific namespace to automate job management or auditing.

Properties

Name Meaning
Namespace The Kubernetes namespace where the CronJobs are located. Defaults to 'default' if not specified.
Resource Name The specific name of the CronJob resource to target. Optional for listing all CronJobs in the namespace.

Output

JSON

  • metadata - Metadata about the CronJob resource, such as name, namespace, labels, and annotations.
  • spec - Specification of the CronJob, including schedule, job template, and concurrency policy.
  • status - Current status of the CronJob, including last schedule time and active jobs.

Dependencies

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

Troubleshooting

  • Ensure Kubernetes credentials are correctly configured and have sufficient permissions to list CronJobs in the specified namespace.
  • If no CronJobs are returned, verify that the namespace is correct and that CronJobs exist in that namespace.
  • Common error: 'No credentials got returned!' indicates missing or misconfigured Kubernetes credentials; verify credential setup in n8n.

Links

Discussion