argo-workflows-demo
argo-workflows-demo copied to clipboard
want to get nodes through workflows
Hi There,
I trying to get nodes through workflows. I am getting this error
Error from server (Forbidden): nodes is forbidden: User "system:serviceaccount:argo:internal-kubectl" cannot list resource "nodes
" in API group "" at the cluster scope
Even though I have added the RBAC rule to list nodes. Below is the RBAC rule
apiVersion: v1
kind: ServiceAccount
metadata:
name: internal-kubectl
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: modify-pods
rules:
- apiGroups: [""]
resources:
- pods
verbs:
- get
- list
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: modify-pods-to-sa
subjects:
- kind: ServiceAccount
name: internal-kubectl
roleRef:
kind: Role
name: modify-pods
apiGroup: rbac.authorization.k8s.io