Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get All Kubernetes Volumes Count

AI-generated

Overview

This node operation retrieves the total count of all Kubernetes volumes within a specified environment. It is useful for scenarios where you need to monitor or audit storage usage in your Kubernetes clusters by quickly obtaining how many volumes are currently present. For example, it can be used in automation workflows that track resource utilization or trigger alerts when volume counts exceed certain thresholds.

Properties

Name Meaning
Id Environment identifier (a required numeric ID specifying which Kubernetes environment to query)

Output

The output JSON contains the count of all Kubernetes volumes found in the specified environment. The exact structure is not fully detailed in the source, but typically it would include a numeric field representing the total volume count. There is no indication that binary data is returned.

Dependencies

  • Requires an API key credential to authenticate with the Portainer API.
  • The node interacts with the Portainer service, which acts as a management layer for Kubernetes environments.
  • The base URL and authentication details must be configured in the node credentials.

Troubleshooting

  • Common issues:
    • Invalid or missing environment identifier (Id) will cause the request to fail.
    • Authentication errors if the API key or credentials are incorrect or expired.
    • Network connectivity problems between n8n and the Portainer API endpoint.
  • Error messages:
    • Unauthorized or 401 errors indicate invalid credentials; verify and update the API key.
    • 404 or environment not found errors suggest the provided environment ID does not exist.
    • Timeout or connection errors may require checking network settings or API availability.

Links and References

Discussion