Overview
This node lists Kubernetes services within a specified namespace by querying the Kubernetes API. It is useful for workflows that need to dynamically discover or monitor services running in a Kubernetes cluster. For example, it can be used to fetch all services in a namespace before performing operations like health checks, service updates, or integration with other systems.
Properties
| Name | Meaning |
|---|---|
| Namespace | The Kubernetes namespace to list services from. Default is "default". |
| Credential | An API authentication token and connection details to access the Kubernetes cluster. |
Output
The node outputs an array of items where each item contains a JSON object with a single field:
service: The name of a Kubernetes service found in the specified namespace.
Example output item:
{
"json": {
"service": "my-service-name"
}
}
No binary data is produced by this node.
Dependencies
- Requires access to a Kubernetes cluster API.
- Needs an API authentication token or credentials with permissions to list services in the target namespace.
- Uses the official Kubernetes client library for JavaScript/TypeScript (
@kubernetes/client-node). - The user must configure the node with valid Kubernetes API credentials (e.g., a service account token).
Troubleshooting
- Common issues:
- Incorrect or missing Kubernetes API credentials will cause authentication failures.
- Specifying a non-existent namespace will result in an empty list or an error.
- Network connectivity issues to the Kubernetes API server can cause timeouts or connection errors.
- Error messages:
- Authentication errors typically indicate invalid or expired tokens; verify and update credentials.
- "Namespace not found" or similar errors mean the namespace does not exist or the user lacks permission.
- TLS verification errors may occur if the cluster uses self-signed certificates; consider enabling skip TLS verification if appropriate.