Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get All Kubernetes Cluster Role Bindings

AI-generated

Overview

This node operation retrieves all Kubernetes Cluster Role Bindings from a specified Kubernetes environment. It is useful for administrators and DevOps engineers who need to audit, monitor, or manage role-based access control (RBAC) configurations within their Kubernetes clusters. For example, it can be used to list all cluster-wide permissions assigned to users or service accounts, helping ensure security compliance or troubleshoot permission issues.

Properties

Name Meaning
Id Environment identifier: a required numeric ID that specifies which Kubernetes environment to query for cluster role bindings.

Output

The output will contain a JSON array of Kubernetes Cluster Role Binding objects. Each object typically includes details such as the binding's metadata (name, labels), subjects (users, groups, or service accounts bound), and the associated cluster role. This structured data allows further processing or integration with other systems.

If the node supports binary data output, it would represent any attached files or manifests related to the cluster role bindings, but based on the provided code and context, the output is JSON only.

Dependencies

  • Requires access to a Kubernetes environment identified by the provided environment ID.
  • The node likely depends on an API connection to the Kubernetes cluster, authenticated via credentials configured in n8n (e.g., a Kubernetes API token or kubeconfig).
  • No explicit external libraries or services are indicated beyond standard Kubernetes API interaction.

Troubleshooting

  • Common Issues:
    • Invalid or missing environment ID may cause failure to connect or retrieve data.
    • Insufficient permissions on the Kubernetes cluster API could result in authorization errors.
    • Network connectivity problems between n8n and the Kubernetes cluster.
  • Error Messages:
    • Authorization errors typically indicate missing or incorrect API credentials.
    • Timeout or connection refused errors suggest network or endpoint configuration issues.
  • Resolutions:
    • Verify the environment ID corresponds to a valid and accessible Kubernetes cluster.
    • Ensure the API credentials have sufficient RBAC permissions to list cluster role bindings.
    • Check network settings and firewall rules allowing n8n to reach the Kubernetes API server.

Links and References

Discussion