Actions54
- Namespace Actions
- Deployment Actions
- Service Actions
- Pod Actions
- StatefulSet Actions
- ConfigMap Actions
- Secret Actions
- Job Actions
- CronJob Actions
- Node Actions
- Workload Actions
Overview
This node allows interaction with Rancher and Kubernetes APIs to manage various Kubernetes resources programmatically within n8n workflows. Specifically, for the Secret resource with the Create operation, it enables users to create new Kubernetes secrets in a specified cluster, project, and namespace.
Common scenarios include:
- Automating the creation of secrets to store sensitive data such as API keys, passwords, or certificates.
- Integrating secret management into CI/CD pipelines to dynamically provision secrets before deploying applications.
- Managing secrets across multiple clusters and namespaces without manual intervention.
Example use case:
- Automatically creating a secret containing database credentials in a specific namespace whenever a new environment is set up.
Properties
Name | Meaning |
---|---|
Cluster Name or ID | Select the target Kubernetes cluster by name or ID where the secret will be created. |
Project Name or ID | (Optional) Select the project within the cluster to scope the secret creation. |
Namespace Name or ID | (Optional) Select the namespace within the project where the secret will be created. |
These properties allow precise targeting of where the secret resource should be created within the Rancher/Kubernetes environment.
Output
The node outputs an array of JSON objects representing the response from the Rancher/Kubernetes API after creating the secret. The json
output field contains details about the newly created secret resource, including metadata such as its name, namespace, and any other relevant information returned by the API.
No binary data output is involved in this operation.
Dependencies
- Requires connection to a Rancher or Kubernetes cluster via an API authentication credential configured in n8n.
- The user must have appropriate permissions to create secrets in the targeted cluster/project/namespace.
- The node depends on internal methods to load options for clusters, projects, and namespaces dynamically.
Troubleshooting
- Missing or invalid cluster/project/namespace: Ensure that the selected cluster, project, and namespace exist and are accessible with the provided credentials.
- Permission errors: The API token used must have sufficient rights to create secrets; otherwise, the API will reject the request.
- Invalid input data: If required fields for the secret creation are missing or malformed, the API may return validation errors.
- Network or connectivity issues: Verify network access to the Rancher/Kubernetes API endpoint.
Common error messages typically relate to authorization failures, resource not found, or validation errors on the secret payload. Resolving these involves checking credentials, resource identifiers, and input correctness.
Links and References
- Kubernetes Secrets Documentation
- Rancher API Reference
- n8n Expressions Documentation (for dynamic property values)