Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get All Kubernetes Cluster Roles

AI-generated

Overview

This node operation retrieves all Kubernetes Cluster Roles from a specified Kubernetes environment. It is useful for users who want to list or audit the cluster roles configured in their Kubernetes cluster, such as administrators managing access control or security teams reviewing role assignments.

Practical examples include:

  • Fetching all cluster roles to display them in a dashboard.
  • Automating compliance checks by analyzing cluster roles.
  • Integrating with other workflows that require knowledge of existing cluster roles.

Properties

Name Meaning
Id Environment identifier (a numeric ID) specifying which Kubernetes environment to query for cluster roles. This is required to target the correct cluster.

Output

The output will contain a JSON array representing the Kubernetes Cluster Roles retrieved from the specified environment. Each item in the array corresponds to a cluster role object as defined by Kubernetes API standards, typically including metadata like name, labels, and rules defining permissions.

No binary data output is indicated.

Dependencies

  • Requires an active connection to a Kubernetes environment identified by the provided environment ID.
  • The node depends on proper API authentication and connectivity to the Kubernetes cluster.
  • No explicit external services beyond Kubernetes API are referenced.
  • Requires configuration of credentials that provide access to the Kubernetes API endpoint.

Troubleshooting

  • Common issues:
    • Invalid or missing environment ID may cause failure to connect or retrieve data.
    • Network connectivity problems between n8n and the Kubernetes cluster.
    • Insufficient permissions for the API token or credentials used to access cluster roles.
  • Error messages:
    • Authentication errors indicate invalid or expired credentials; verify and update API tokens.
    • Timeout or connection refused errors suggest network or endpoint misconfiguration.
    • Permission denied errors mean the API user lacks rights to list cluster roles; adjust RBAC settings accordingly.

Links and References

Discussion