Actions54
- Namespace Actions
- Deployment Actions
- Service Actions
- Pod Actions
- StatefulSet Actions
- ConfigMap Actions
- Secret Actions
- Job Actions
- CronJob Actions
- Node Actions
- Workload Actions
Overview
The node enables interaction with Rancher and Kubernetes APIs to manage various Kubernetes resources. Specifically, for the Deployment - Create operation, it allows users to create a new deployment resource within a specified Kubernetes cluster environment.
This is useful in scenarios where you want to programmatically deploy containerized applications by specifying details such as the Docker image, number of replicas, ports, environment variables, and metadata like labels and annotations. For example, you can automate the deployment of a web application by creating a deployment that runs multiple replicas of a specific Docker image, exposing a container port, and setting environment variables required by the app.
Properties
Name | Meaning |
---|---|
Name | The name of the deployment resource to create. |
Image | The Docker image to use for the deployment's container(s). |
Replicas | Number of pod replicas to run under this deployment. Defaults to 1. |
Container Port | The port number to expose on the container. Defaults to 80. |
Environment Variables | A collection of environment variables to set inside the container. Each variable has a Name and Value. |
Cluster Name or ID | Select the target Kubernetes cluster by name or ID where the deployment will be created. |
Project Name or ID | (Optional) Select the project within the cluster. |
Namespace Name or ID | (Optional) Select the namespace within the project where the deployment will reside. |
Labels | Key-value pairs to label the deployment resource for identification or selection purposes. |
Annotations | Key-value pairs to annotate the deployment resource with additional metadata. |
Output
The node outputs an array of JSON objects representing the result of the deployment creation API call. Each output item contains the full JSON response from the Rancher/Kubernetes API describing the created deployment resource, including its metadata, spec, status, and other relevant fields.
No binary data output is produced by this operation.
Dependencies
- Requires access to a Rancher or Kubernetes API endpoint.
- Requires an API authentication credential configured in n8n to authorize requests.
- The user must select or specify valid cluster, project, and namespace identifiers where the deployment will be created.
- The Docker image specified must be accessible by the Kubernetes cluster nodes.
Troubleshooting
- Invalid or missing cluster/project/namespace: Ensure the selected cluster, project, and namespace exist and are accessible with the provided credentials.
- Authentication errors: Verify that the API key or token credential used has sufficient permissions to create deployments.
- Invalid Docker image: Confirm the image name and tag are correct and the image is available in the container registry accessible by the cluster.
- Port conflicts or invalid values: Make sure the container port is a valid number and not conflicting with existing services.
- Missing required properties: The "Name" and "Image" fields are mandatory; ensure they are provided.
- API errors: Review the error message returned by the API for details; common issues include quota limits, resource conflicts, or misconfigured parameters.
Links and References
- Kubernetes Deployments
- Rancher API Documentation
- n8n Expressions Documentation (for dynamic parameter values)