Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get Kubernetes Volumes In Namespace

AI-generated

Overview

This node operation retrieves Kubernetes volumes within a specified namespace. It is useful for users who want to list or inspect storage volumes allocated in a particular Kubernetes namespace, which can help with managing persistent storage resources in containerized environments. For example, DevOps engineers might use this node to audit volume usage or to gather information before performing maintenance or scaling operations.

Properties

Name Meaning
Id Environment identifier (a numeric ID representing the Kubernetes environment to query).
Namespace The Kubernetes namespace from which to retrieve volumes.
Additional Fields Optional extra parameters:
- With Applications Boolean flag indicating whether to include applications that are using the volumes (true/false).

Output

The output JSON contains details about the Kubernetes volumes found in the specified namespace. If the "With Applications" option is enabled, the output also includes information about the applications utilizing those volumes. This allows users to see not only the volumes but also their consumers within the namespace.

No binary data output is indicated by the source code.

Dependencies

  • Requires an API key credential to authenticate against the Portainer API.
  • The node interacts with the Portainer API endpoint configured via credentials, specifically targeting Kubernetes-related endpoints.
  • Proper configuration of the API URL and authentication token is necessary in n8n credentials.

Troubleshooting

  • Common issues:

    • Incorrect or missing environment ID or namespace may result in empty or error responses.
    • Authentication failures if the API key or URL is misconfigured.
    • Network connectivity problems between n8n and the Portainer API server.
  • Error messages:

    • Authorization errors typically indicate invalid or expired API credentials.
    • Not found errors may occur if the specified namespace or environment ID does not exist.
  • Resolutions:

    • Verify that the environment ID and namespace values are correct.
    • Check and update API credentials in n8n settings.
    • Ensure network access to the Portainer API endpoint.

Links and References

Discussion