Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get Kubernetes Cron Jobs

AI-generated

Overview

This node operation retrieves Kubernetes Cron Jobs from a specified environment. It is useful for users who want to programmatically access and manage scheduled jobs within their Kubernetes clusters. Typical scenarios include monitoring cron job configurations, auditing scheduled tasks, or integrating Kubernetes job data into automation workflows.

For example, a DevOps engineer might use this node to fetch all cron jobs in a particular Kubernetes environment to verify their schedules or statuses as part of a CI/CD pipeline.

Properties

Name Meaning
Id Environment identifier (a required numeric ID specifying which Kubernetes environment to query)

Output

The output JSON contains the details of the Kubernetes Cron Jobs retrieved from the specified environment. This typically includes metadata such as job names, schedules, namespaces, and status information. The exact structure depends on the Kubernetes API response for cron jobs.

No binary data output is indicated.

Dependencies

  • Requires an active connection to a Kubernetes environment identified by the provided environment ID.
  • Requires appropriate API authentication credentials configured in n8n to access the Kubernetes cluster.
  • The node uses the Portainer API client internally, so the Portainer service must be accessible and properly configured with valid credentials.

Troubleshooting

  • Common issues:
    • Invalid or missing environment ID may cause failure to retrieve cron jobs.
    • Authentication errors if the API credentials are incorrect or expired.
    • Network connectivity problems between n8n and the Kubernetes/Portainer API endpoint.
  • Error messages:
    • "Unauthorized" or "Authentication failed": Check API credentials and permissions.
    • "Environment not found": Verify that the environment ID exists and is correct.
    • Timeout or network errors: Ensure network access and API endpoint availability.

Links and References

Discussion