Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get Kubernetes Service Accounts

AI-generated

Overview

This node operation retrieves Kubernetes Service Accounts from a specified environment. It is useful for scenarios where you need to list or inspect service accounts within a particular Kubernetes cluster environment, such as for auditing permissions, managing access controls, or integrating Kubernetes identity information into workflows.

For example, you might use this node to fetch all service accounts in a development environment to verify which accounts have access to certain namespaces or resources.

Properties

Name Meaning
Id Environment identifier (a numeric ID representing the Kubernetes environment from which to retrieve service accounts)

Output

The output will contain JSON data representing the Kubernetes Service Accounts retrieved from the specified environment. Each item in the output corresponds to a service account object with its associated metadata and details as provided by the Kubernetes API.

If the node supports binary data output, it would typically relate to any attached certificates or tokens associated with the service accounts, but based on the provided code and properties, the primary output is JSON-formatted service account data.

Dependencies

  • Requires an API key or authentication token configured in the node credentials to access the Kubernetes environment.
  • The node depends on connectivity to the Kubernetes API server corresponding to the specified environment ID.
  • No additional external services are explicitly required beyond the Kubernetes API.

Troubleshooting

  • Common issues:
    • Invalid or missing environment identifier may cause the node to fail to locate the Kubernetes cluster.
    • Authentication failures due to incorrect or expired API credentials.
    • Network connectivity issues preventing access to the Kubernetes API server.
  • Error messages:
    • Errors indicating unauthorized access usually mean the API key or token is invalid or lacks sufficient permissions.
    • Timeout or connection errors suggest network problems or incorrect API endpoint configuration.
  • Resolutions:
    • Verify that the environment ID corresponds to a valid Kubernetes cluster setup.
    • Ensure the API credentials are correctly configured and have necessary permissions.
    • Check network settings and firewall rules to allow communication with the Kubernetes API.

Links and References

Discussion