Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get Kubernetes Secrets

AI-generated

Overview

This node operation retrieves Kubernetes Secrets from a specified environment. It is useful for scenarios where you need to programmatically access secret data stored in Kubernetes clusters, such as credentials, tokens, or configuration details that applications use. A practical example includes automating the retrieval of secrets to update application configurations or audit secret usage across environments.

Properties

Name Meaning
Id The identifier of the Kubernetes environment from which to fetch the secrets (a numeric ID).
Is Used When true, the node associates the retrieved secrets with the applications that utilize them.

Output

The output contains JSON data representing the Kubernetes Secrets fetched from the specified environment. If "Is Used" is set to true, the output will also include associations between secrets and the applications using them. This allows downstream nodes to process secrets along with their usage context.

No binary data output is indicated by the source code.

Dependencies

  • Requires an API key credential to authenticate requests to the Kubernetes environment.
  • The node interacts with a Portainer API endpoint configured via credentials, which acts as a proxy or management layer for Kubernetes operations.
  • Proper configuration of the base URL and authentication token for the Portainer API is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing environment identifier (Id) can cause failure to retrieve secrets.
    • Incorrect or expired API credentials may result in authentication errors.
    • Network connectivity problems to the Portainer API endpoint can prevent data retrieval.
  • Error messages:

    • Authentication failures typically indicate invalid API keys or misconfigured credentials.
    • "Not Found" errors may mean the specified environment ID does not exist.
    • Timeout or connection errors suggest network or endpoint availability issues.
  • Resolutions:

    • Verify the environment ID is correct and exists.
    • Ensure API credentials are valid and have sufficient permissions.
    • Check network connectivity and Portainer API endpoint accessibility.

Links and References

Discussion