Rancher27 icon

Rancher27

Interact with Rancher/Kubernetes API

Actions40

Overview

This node integrates with the Rancher/Kubernetes API to manage Kubernetes resources, specifically including StatefulSets. The "Scale" operation for StatefulSets allows users to adjust the number of pod replicas in a StatefulSet dynamically. This is useful for scaling applications up or down based on demand, such as increasing replicas during high traffic periods or reducing them to save resources.

Practical examples:

  • Automatically scale a StatefulSet running a database cluster to add more nodes for load balancing.
  • Reduce the number of replicas during off-peak hours to optimize resource usage.

Properties

Name Meaning
Replicas Number of replicas (pods) to set for the StatefulSet when scaling.
Cluster Name or ID Select the Kubernetes cluster where the StatefulSet resides. Can be chosen from a list or specified via expression.
Project Name or ID Select the project within the cluster. Depends on the selected cluster.
Namespace Name or ID Select the namespace within the project where the StatefulSet exists.

Output

The node outputs JSON data representing the result of the scale operation on the StatefulSet. This typically includes details about the updated StatefulSet resource, such as its name, current replica count, and status information returned by the Rancher/Kubernetes API.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to a Rancher or Kubernetes cluster via an API key credential.
  • Needs proper configuration of cluster, project, and namespace identifiers to target the correct StatefulSet.
  • The node depends on internal methods that interact with the Rancher/Kubernetes API endpoints for StatefulSet operations.

Troubleshooting

  • Common issues:

    • Incorrect cluster, project, or namespace selection can cause failures in locating the StatefulSet.
    • Insufficient permissions or invalid API credentials may lead to authorization errors.
    • Specifying an invalid number of replicas (e.g., negative numbers) might cause API rejections.
  • Error messages and resolutions:

    • "Resource not found" — Verify that the cluster, project, namespace, and StatefulSet exist and are correctly specified.
    • "Unauthorized" or "Forbidden" — Check API credentials and ensure the user has permission to scale StatefulSets.
    • "Invalid input" — Confirm that the replicas value is a non-negative integer.

Links and References

Discussion