I created an admin role for the namespace and build that so the role got created. However, I wanted to know whether creating a role to a namespace is enough or we need to create a user and configure some additional changes to apply that role? Please suggest.
Here is the role that I've created:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: admin
namespace: temp
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: [""]
resources: ["*"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
To read more about RBAC Authorization you can visit the official documentation, additionally there are some ready tutorials about configuring the RBAC like those: