Skip to content

Commit

Permalink
Merge pull request #104 from akrejcir/improve-doc-example
Browse files Browse the repository at this point in the history
docs: Add example command how to bind ClusterRole
  • Loading branch information
kubevirt-bot authored Mar 7, 2024
2 parents 4a4f477 + 60825fa commit 69d698a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ See the [API documentation](docs/api.md).

The `token.kubevirt.io:generate` `ClusterRole` can be bound to users or service accounts to give
them permission to call the API.

Here are example commands how to bind it to a user or a service account:
```bash
# Bind ClusterRole to a user
kubectl create rolebinding "${ROLE_BINDING_NAME}" --clusterrole="token.kubevirt.io:generate" --user="${USER_NAME}"

# Bind ClusterRole to a ServiceAccount
kubectl create rolebinding "${ROLE_BINDING_NAME}" --clusterrole="token.kubevirt.io:generate" --serviceaccount="${SERVICE_ACCOUNT_NAME}"
```

0 comments on commit 69d698a

Please sign in to comment.