Kubernetes icon

Kubernetes

Interact with Kubernetes

CronJobs → Scale

AI-generated

Overview

This node interacts with Kubernetes to perform various operations on Kubernetes resources. Specifically, the 'Scale' operation allows users to adjust the number of replicas for a specified Kubernetes resource, such as a CronJob. This is useful for scaling workloads up or down dynamically based on demand or operational requirements.

Use Case Examples

  1. Scaling a CronJob named 'my-cronjob' in the 'default' namespace to 3 replicas to handle increased workload.
  2. Reducing the replicas of a CronJob to 0 to temporarily stop its execution without deleting it.

Properties

Name Meaning
Namespace The Kubernetes namespace where the target resource (CronJob) resides. Defaults to 'default' if not specified.
Resource Name The name of the specific Kubernetes resource (CronJob) to scale.
Replicas The desired number of replicas to scale the resource to.

Output

JSON

  • json - The JSON response from the Kubernetes API after scaling the resource, typically containing the updated resource status or confirmation.

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, the node throws an error indicating that the resource name is required for the scale operation.
  • Errors from the Kubernetes API, such as insufficient permissions or invalid replica counts, may also occur and should be handled by verifying user permissions and input values.

Discussion