I'm checking Argo and I would like to grant a specific namespace for a user (or multiple users) to use Argo workflow (and let the users access features such as artifacts, outputs, access to secrets). I have set up a user and created a namespace (testing in minikube). How should I bind roles for the user, namespace and Argo workflow?
Here is role and rolebinding yaml files I have now.
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: pod-reader
rules:
- apiGroups: [“”]
resources: [“pods”]
verbs: [“get”, “watch”, “list”]
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: read-pods
namespace: default
subjects:
- kind: User
name: user1
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: pod-reader
apiGroup: rbac.authorization.k8s.io
Thank you!
答案 0 :(得分:1)
一个很好的指南,逐步介绍了如何创建名称空间,用户以及仅在所选名称空间中与该用户一起使用的权限:
Step 2: Create the credentials
Step 3: Create the role for managing deployments