Actions90
- Jobs Actions
- Namespaces Actions
- Pods Actions
- Services Actions
- Deployments Actions
- ReplicaSets Actions
- StatefulSets Actions
- DaemonSets Actions
- CronJobs Actions
Overview
This node allows interaction with Kubernetes resources, specifically supporting operations such as getting, listing, deleting, running pods, and scaling resources like ReplicaSets. The "Scale" operation enables users to adjust the number of replicas for a ReplicaSet within a specified namespace.
Common scenarios include:
- Automatically scaling ReplicaSets based on workload demands.
- Managing Kubernetes resources programmatically within n8n workflows.
- Integrating Kubernetes resource management into CI/CD pipelines or monitoring systems.
For example, you can use this node to scale a ReplicaSet named "frontend" in the "production" namespace from 3 to 5 replicas during peak traffic hours.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace where the ReplicaSet resides. Defaults to "default". |
| Resource Name | The name of the ReplicaSet resource to scale. |
Note: These properties are used when performing the Scale operation on ReplicaSets.
Output
The node outputs JSON data representing the result of the Kubernetes API call related to the operation performed. For the Scale operation, this typically includes the updated state of the ReplicaSet after scaling, such as the new replica count and metadata.
If the node supports binary data output (not evident for Scale), it would represent any binary content returned by Kubernetes, but this is not applicable here.
Dependencies
- Requires an API key credential for authenticating with the Kubernetes cluster.
- The node depends on a Kubernetes client utility (
K8SClient) internally to communicate with the Kubernetes API. - Proper configuration of the Kubernetes credentials in n8n is necessary to allow API access.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes API credentials. Ensure that valid credentials are set up in n8n before executing the node.Command must be an array!
Although not directly related to Scale, this error may appear if using the Run operation with an invalid command format. Commands must be provided as JSON arrays.Resource not found or permission denied
If the specified ReplicaSet or namespace does not exist or the credentials lack permissions, the node will fail. Verify resource names, namespaces, and RBAC permissions.Invalid input parameters
Ensure that the Namespace and Resource Name fields are correctly filled. Empty or incorrect values may cause API errors.