#1153 update rancher kubernetes api project creation workflow doc to include annotation requirement for cluster member (#1167)

* Update Rancher Kubernetes API Project creation workflow doc to include annotation requirement for Cluster Member

* revised note

* revised wording
This commit is contained in:
Marty Hernandez Avedon
2024-03-11 10:15:29 -04:00
committed by GitHub
parent 1f6a00bef3
commit ef19e6525d
2 changed files with 40 additions and 0 deletions
+20
View File
@@ -29,6 +29,26 @@ Use `metadata.generateName` to ensure a unique project ID, but note that `kubect
Set `metadata.namespace` and `spec.clusterName` to the ID for the cluster the project belongs to.
If you create a project through a cluster member account, you must include the annotation, `field.cattle.io/creatorId`, and set it to the cluster member account's user ID.
```bash
kubectl create -f - <<EOF
apiVersion: management.cattle.io/v3
kind: Project
metadata:
annotations:
field.cattle.io/creatorId:
user-id
generateName: p-
namespace: c-m-abcde
spec:
clusterName: c-m-abcde
displayName: myproject
EOF
```
Setting the `field.cattle.io/creatorId` field allows the cluster member account to see project resources with the `get` command and view the project in the Rancher UI. Cluster owner and admin accounts don't need to set this annotation to perform these tasks.
### Creating a Project With a Resource Quota
Refer to [Kubernetes Resource Quota](https://kubernetes.io/docs/concepts/policy/resource-quotas/).