Actions90
- Jobs Actions
- Namespaces Actions
- Pods Actions
- Services Actions
- Deployments Actions
- ReplicaSets Actions
- StatefulSets Actions
- DaemonSets Actions
- CronJobs Actions
Overview
This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, for the Deployments resource and the Scale operation, it allows users to scale a deployment within a specified namespace by adjusting the number of replicas.
Common scenarios where this node is beneficial include:
- Automatically scaling deployments up or down based on external triggers or workflows.
- Managing deployment sizes programmatically without manual intervention in the Kubernetes dashboard or CLI.
- Integrating Kubernetes scaling actions into broader automation pipelines.
For example, you could use this node to scale a deployment named "web-app" in the "default" namespace from 3 replicas to 5 replicas as part of an automated workflow responding to increased traffic.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace where the deployment resides. Defaults to "default". |
| Resource Name | The name of the specific deployment resource to scale. |
Note: Although the bundled code supports many operations and resources, for the Deployments - Scale combination, these two properties are essential inputs.
Output
The node outputs JSON data representing the result of the scale operation. This typically includes the updated state of the deployment resource after scaling, such as the new replica count and metadata confirming the change.
No binary data output is involved in this operation.
Dependencies
- Requires valid Kubernetes API credentials configured in n8n to authenticate and interact with the cluster.
- The node depends on a Kubernetes client utility internally to communicate with the Kubernetes API.
- Proper RBAC permissions must be granted to the credentials used, allowing scaling (patching) of deployments in the target namespace.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes API credentials. Ensure that the node has access to valid credentials with appropriate permissions.Resource not found or unauthorized errors
Verify that the specified namespace and deployment name exist and that the credentials have permission to modify them.Invalid input values
Make sure the "Namespace" and "Resource Name" fields are correctly set and correspond to existing Kubernetes resources.API communication issues
Network connectivity problems or incorrect Kubernetes API endpoint configuration can cause failures. Confirm network access and correct credential setup.