Kubernetes icon

Kubernetes

Interact with Kubernetes

Services → 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 deployment or service, within a given namespace. This is useful for scaling applications up or down based on demand or resource availability.

Use Case Examples

  1. Scaling a deployment named 'my-app' in the 'default' namespace to 3 replicas to handle increased traffic.
  2. Reducing the number of replicas of a service to 1 during low usage periods to save resources.

Properties

Name Meaning
Namespace The Kubernetes namespace where the target resource resides. Defaults to 'default' if not specified.
Resource Name The name of the Kubernetes resource 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 details.

Dependencies

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

Troubleshooting

  • Ensure that the 'Resource Name' is provided; otherwise, the node will throw an error indicating the resource name is required for the scale operation.
  • Verify that the Kubernetes credentials are correctly configured and have sufficient permissions to scale the specified resource.
  • Check that the 'Replicas' value is a valid number; invalid values may cause the scaling operation to fail.

Links

  • Kubernetes Deployment Scaling - Official Kubernetes documentation on how to scale deployments, which is relevant to understanding the scale operation.

Discussion