Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get Kubernetes Volume

AI-generated

Overview

This node operation retrieves detailed information about a specific Kubernetes volume within a given namespace and environment. It is useful for users who need to programmatically access volume configurations or metadata in their Kubernetes clusters, such as for auditing, monitoring, or integration with other systems.

Practical examples include:

  • Fetching volume details before performing backup or migration tasks.
  • Validating volume existence and properties during deployment automation.
  • Integrating volume data into dashboards or reporting tools.

Properties

Name Meaning
Id Numeric identifier of the Kubernetes environment (cluster) to query.
Namespace The Kubernetes namespace where the volume resides.
Volume The name of the Kubernetes volume to retrieve information about.

Output

The node outputs JSON data representing the Kubernetes volume's details. This typically includes metadata such as volume name, labels, annotations, storage class, capacity, access modes, and any other relevant configuration parameters defined in the Kubernetes API for volumes.

No binary data output is expected from this operation.

Dependencies

  • Requires an active connection to a Kubernetes cluster identified by the provided environment Id.
  • Proper authentication and permissions to access the Kubernetes API for the specified namespace and volume.
  • The node depends on an API key or token credential configured in n8n to authenticate requests against the Kubernetes environment.

Troubleshooting

  • Common issues:

    • Invalid or missing environment Id can cause failure to connect to the Kubernetes cluster.
    • Incorrect namespace or volume name will result in "not found" errors.
    • Insufficient permissions may lead to authorization errors when accessing the Kubernetes API.
  • Error messages and resolutions:

    • "Volume not found": Verify that the volume name and namespace are correct and exist in the target cluster.
    • "Unauthorized" or "Forbidden": Check that the API credentials have sufficient rights to read volume information.
    • "Connection failed": Ensure network connectivity to the Kubernetes API server and validate environment Id configuration.

Links and References

Discussion