argo-workflows-demo icon indicating copy to clipboard operation
argo-workflows-demo copied to clipboard

want to get nodes through workflows

Open nishit93-hub opened this issue 2 years ago • 2 comments

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 

nishit93-hub avatar Jan 04 '22 11:01 nishit93-hub