Grant cluster access
grant_cluster_accessGive an organisation member time-boxed Kubernetes access to one cluster through the Ankra cluster gateway (the twin of ankra cluster access grant). Needs kube_access.manage; a kube_access.elevate holder may only grant themselves inside the self-elevation bounds (use elevate_cluster_access). The grant must expire (expires_in or expires_at): a standing grant is made in the portal or with the CLI. The organisation access policy bounds it: the role ceiling, the longest an elevated grant may last, and when a reason is required; a refusal names the bound. A matching live grant with an expiry is re-timed in place. Always have the user confirm the member, cluster, role and lifetime first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_email": "<user_email>",
"role": "<role>"
},
"name": "grant_cluster_access"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | Kubernetes role the grant carries; must not exceed the organisation access policy's max_grant_role (get_cluster_access_policy). | |
| scope | No | cluster (default) for the whole cluster, namespace for one namespace. | |
| reason | No | Why the access is needed. The organisation access policy may require it for elevated roles (require_reason_from_role). | |
| namespace | No | The namespace, required with scope namespace and refused otherwise (a DNS-1123 label). | |
| cluster_id | No | UUID of the cluster. Optional when a cluster is selected. | |
| expires_at | No | When the grant ends, an RFC 3339 timestamp at least a minute ahead. Give this or expires_in. | |
| expires_in | No | How long the grant lasts: whole days (7d) or a duration (30m, 4h, 1h30m), at least 1m. Give this or expires_at. | |
| user_email | Yes | Email of the organisation member to grant access to. | |
| cluster_name | No | Exact name of the cluster. Optional when a cluster is selected. |