Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Delete Cluster Roles

AI-generated

Overview

This node operation allows users to delete multiple Kubernetes cluster roles in a single request. It is useful for administrators or automation workflows that need to clean up or manage access control by removing specific cluster roles from a Kubernetes environment. For example, if certain roles are no longer needed or were created temporarily, this operation can efficiently remove them by specifying their identifiers.

Properties

Name Meaning
Id Environment identifier (a numeric ID) specifying which Kubernetes environment to target.
Payload A string representing a list of cluster roles to delete. This should contain the identifiers or names of the cluster roles intended for deletion.

Output

The output contains a JSON object reflecting the result of the delete operation. Typically, it will confirm which cluster roles were successfully deleted or provide error details if any deletions failed. The exact structure depends on the API response but generally includes status information and possibly a summary of affected roles.

No binary data output is expected from this operation.

Dependencies

  • Requires an active connection to a Kubernetes environment identified by the provided environment ID.
  • Needs appropriate API authentication credentials configured in n8n to authorize requests against the Kubernetes API or the intermediary service managing Kubernetes resources.
  • The node relies on HTTP requests with JSON payloads to communicate with the Kubernetes API or a management layer.

Troubleshooting

  • Common issues:
    • Invalid or missing environment ID may cause the request to fail due to inability to locate the target Kubernetes environment.
    • Incorrectly formatted payload (e.g., not a valid list of cluster role identifiers) can lead to errors or no roles being deleted.
    • Insufficient permissions or expired API credentials will result in authorization errors.
  • Error messages:
    • "Unauthorized" or "Forbidden": Check API credentials and ensure they have permission to delete cluster roles.
    • "Not Found": Verify that the specified cluster roles exist in the targeted environment.
    • "Bad Request": Confirm the payload format matches expected input (a list of cluster roles).

Links and References

Discussion