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 Services resource and the Get operation, it retrieves information about one or more Kubernetes Service objects within a specified namespace.
Common scenarios where this node is beneficial include:
- Fetching details of a specific Service by name.
- Listing Services filtered by labels or fields to monitor or audit service configurations.
- Integrating Kubernetes Service data into automation workflows, such as deployment pipelines or monitoring dashboards.
For example, you can use this node to get the details of a Service named "my-service" in the "default" namespace or list all Services with a particular label selector to trigger alerts or updates.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace where the Service resource resides. Defaults to "default". |
| Resource Name | The name of the specific Service resource to retrieve. If provided, the node fetches that exact Service; otherwise, it can return multiple Services based on selectors. |
| Field Selector | A field selector string to filter the Services returned. This uses Kubernetes field selectors syntax (e.g., metadata.name=my-service). Useful for precise filtering of resources. See Kubernetes Field Selectors. |
| Label Selector | A label selector string to filter the Services returned. This uses Kubernetes label selectors syntax (e.g., app=frontend). Useful for selecting resources based on labels. See Kubernetes Labels. |
Output
The output is a JSON array containing the retrieved Service resource(s) data from the Kubernetes cluster. Each item corresponds to a Service object matching the query parameters (namespace, resource name, field selector, label selector).
The structure of each JSON object follows the standard Kubernetes Service resource schema, including metadata, spec, and status fields.
No binary data output is produced by this operation.
Dependencies
- Requires access to a Kubernetes cluster with appropriate permissions to read Service resources.
- Needs an API authentication token or credentials configured in n8n to connect securely to the Kubernetes API.
- The node depends on internal Kubernetes client utilities bundled with the node implementation to communicate with the cluster.
Troubleshooting
No credentials got returned!
This error indicates missing or misconfigured Kubernetes API credentials in n8n. Ensure that valid credentials are set up and linked to the node.Empty or no results returned:
Verify that the namespace, resource name, field selector, and label selector parameters are correct and that the target Services exist in the cluster.Invalid field selector or label selector syntax:
Use proper Kubernetes selector syntax. Refer to the official Kubernetes documentation for correct usage.Network or permission errors:
Confirm network connectivity to the Kubernetes API server and that the credentials have sufficient RBAC permissions to perform "get" operations on Services.