Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get All Kubernetes Applications

AI-generated

Overview

This node operation retrieves all Kubernetes applications from a specified environment endpoint. It is designed to query a Kubernetes cluster for application data within a given namespace and node. This can be useful for monitoring, auditing, or managing Kubernetes workloads programmatically within an n8n workflow.

Typical use cases include:

  • Fetching a list of all applications deployed in a specific Kubernetes namespace.
  • Integrating Kubernetes application data into dashboards or reports.
  • Automating deployment verification by checking existing applications on a node.
  • Including dependency information about applications when needed.

Properties

Name Meaning
Id Environment (Endpoint) identifier; numeric ID representing the Kubernetes environment to query.
Namespace The Kubernetes namespace name where the applications are located.
Node Name The name of the Kubernetes node to filter applications by.
Additional Fields Optional extra parameters:
• With Dependencies: Boolean flag to include dependencies in the response (true/false).

Output

The node outputs JSON data containing the list of Kubernetes applications matching the specified criteria (environment ID, namespace, and node name). If the "With Dependencies" option is enabled, the output will also include related dependency information for each application.

The exact structure of the JSON output depends on the Kubernetes API response but generally includes details such as application names, statuses, configurations, and optionally their dependencies.

No binary data output is indicated.

Dependencies

  • Requires access to a Kubernetes environment endpoint identified by the provided environment ID.
  • Needs proper authentication and connectivity to the Kubernetes API server.
  • The node expects an API key or token configured in the credentials to authenticate requests.
  • No additional external services beyond the Kubernetes API are required.

Troubleshooting

  • Common issues:
    • Invalid or missing environment ID may cause failure to connect to the Kubernetes cluster.
    • Incorrect namespace or node name will result in empty or no results.
    • Network or permission issues with the Kubernetes API can cause errors.
  • Error messages:
    • Authentication errors indicate invalid or missing API credentials.
    • "Namespace not found" or similar errors suggest the specified namespace does not exist.
    • Timeout or connection errors imply network problems or incorrect endpoint URLs.
  • Resolutions:
    • Verify that the environment ID corresponds to a valid and accessible Kubernetes cluster.
    • Double-check namespace and node name spelling and existence.
    • Ensure API credentials are correctly set up and have sufficient permissions.
    • Confirm network connectivity to the Kubernetes API server.

Links and References

Discussion