Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get All Kubernetes Applications Count

AI-generated

Overview

This node interacts with a Kubernetes environment through the Portainer API to retrieve the count of all Kubernetes applications. It is useful for users who want to monitor or audit the number of applications deployed in a specific Kubernetes environment managed by Portainer. For example, it can be used in automation workflows that track deployment metrics or trigger alerts when application counts exceed certain thresholds.

Properties

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

Output

The node outputs JSON data containing the count of all Kubernetes applications within the specified environment. The exact structure is not fully detailed in the provided code, but typically it would include a numeric field representing the total count. There is no indication that the node outputs binary data.

Dependencies

  • Requires an API key credential to authenticate with the Portainer API.
  • Needs the base URL of the Portainer instance configured in credentials.
  • Depends on the @devlikeapro/n8n-openapi-node package and a local OpenAPI specification (openapi.json) for request building.
  • The node uses Portainer's REST API endpoints to fetch Kubernetes application data.

Troubleshooting

  • Common issues:
    • Invalid or missing environment identifier (Id) will cause the request to fail.
    • Incorrect or expired API credentials may result in authentication errors.
    • Network connectivity problems to the Portainer server will prevent data retrieval.
  • Error messages:
    • Authentication failures usually indicate invalid API keys or insufficient permissions.
    • "Not Found" errors may mean the specified environment ID does not exist.
    • Timeout or connection errors suggest network or server availability issues.
  • Resolutions:
    • Verify the environment ID is correct and exists in Portainer.
    • Ensure API credentials are valid and have necessary access rights.
    • Check network connectivity and Portainer server status.

Links and References

Discussion