Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, for the Jobs - Get operation, it retrieves information about one or more Job resources within a specified namespace. This is useful for monitoring job status, fetching job details, or integrating Kubernetes job data into workflows.

Common scenarios include:

  • Fetching details of a specific Job by name.
  • Listing Jobs filtered by labels or fields to monitor batch processing tasks.
  • Integrating Kubernetes job metadata into automation pipelines.

Example: Retrieve a Job named "data-processing-job" in the "default" namespace to check its current status and metadata.

Properties

Name Meaning
Namespace The Kubernetes namespace where the Job resource resides. Defaults to "default".
Resource Name The exact name of the Job resource to retrieve. If provided, the node fetches this specific Job.
Field Selector A field selector string to filter Jobs based on resource fields (e.g., metadata.name=job1). See Kubernetes docs for syntax.
Label Selector A label selector string to filter Jobs based on labels (e.g., app=batch). See Kubernetes docs for syntax.

Output

The output is a JSON array containing the retrieved Job resource(s) data as returned by the Kubernetes API. Each item corresponds to a Job object with all its standard Kubernetes fields such as metadata, spec, and status.

No binary data is output by this operation.

Dependencies

  • Requires an active connection to a Kubernetes cluster.
  • Needs an API authentication token or credentials configured in n8n to access the Kubernetes API.
  • The node uses a Kubernetes client utility internally to communicate with the cluster.

Troubleshooting

  • No credentials got returned!
    This error indicates missing or misconfigured Kubernetes API credentials. Ensure that valid credentials are set up in n8n before running the node.

  • Empty or no results returned
    Check that the namespace, resource name, field selector, and label selector parameters are correct and match existing Jobs in the cluster.

  • Invalid field selector or label selector syntax
    Refer to Kubernetes documentation on selectors to ensure proper formatting.

Links and References

Discussion