---
title: "ezgh kubernetes access-entries create"
description: "Give a principal access to a cluster."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh kubernetes access-entries create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh kubernetes access-entries create --cluster c --principal p [--principal-type t] [--kubernetes-group g]... [--policy name[:ns,…]]... [flags]
```

Give an EZGH principal access to a cluster. `--principal` is a bot (bot\_…), an EZGH SSO user (usr\_…) or a group (grp\_…), or with `--principal-type` user a user's ID. `--policy` is clusterAdmin, admin, edit or view: alone for the whole cluster, or name:ns1,ns2 for those namespaces.

Part of [`ezgh kubernetes access-entries`](/cli/reference/kubernetes-access-entries).

## Examples

```sh
ezgh kubernetes access-entries create --cluster prod --principal grp_7t3n1v8c2wzd --policy edit:web,api
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--cluster` | string |  | the cluster |
| `--kubernetes-group` | string, repeatable |  | a Kubernetes group the principal is in; repeat for more |
| `--policy` | string, repeatable |  | an access policy, name or name:ns1,ns2; repeat for more |
| `--principal` | string |  | a bot (bot\_…), an SSO user (usr\_…), a group (grp\_…), or a user's ID |
| `--principal-type` | string |  | user, bot, ssoUser or group: needed with a user's ID |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/kubernetes-access-entries-create/index.mdx
