Kubernetes icon

Kubernetes

Interact with Kubernetes

CronJobs → Restart

AI-generated

Overview

This node interacts with Kubernetes to perform various operations on Kubernetes resources. Specifically, the 'Restart' operation restarts a specified Kubernetes resource such as a CronJob within a given namespace. This is useful for scenarios where you need to refresh or restart a resource to apply changes or recover from an error state. For example, restarting a CronJob can help re-trigger scheduled jobs without deleting and recreating them.

Use Case Examples

  1. Restarting a CronJob named 'daily-backup' in the 'default' namespace to re-trigger its scheduled tasks.
  2. Restarting a deployment to apply new configuration changes without downtime.

Properties

Name Meaning
Image The container image to use, relevant for operations like run, restart, exec, and patch.
Namespace The Kubernetes namespace where the resource resides. Defaults to 'default' if not specified.
Resource Name The name of the specific Kubernetes resource to operate on, such as the name of the CronJob to restart.

Output

JSON

  • json - The JSON output contains the result of the restart operation, typically the status or confirmation of the resource restart.

Dependencies

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

Troubleshooting

  • Common issues include missing or incorrect Kubernetes credentials, which will cause authentication failures.
  • If the resource name is not provided for the restart operation, the node throws an error indicating that the resource name is required.
  • Errors may occur if the specified namespace or resource does not exist; ensure the namespace and resource name are correct.

Links

Discussion