Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

want to get nodes through workflows #2

Open
nishit93-hub opened this issue Jan 4, 2022 · 2 comments
Open

want to get nodes through workflows #2

nishit93-hub opened this issue Jan 4, 2022 · 2 comments

Comments

@nishit93-hub
Copy link

nishit93-hub commented Jan 4, 2022

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 
@vfarcic
Copy link
Owner

vfarcic commented Jan 7, 2022

Sorry for not responding earlier... The notification about this issue got buried in my mailbox.

Are you following one of my Gists or changing the manifests for your needs? If it's the former, can you please let me know which one it is (I tend to use repos for many different purposes). If it's the latter, could you create a Gist so that I try to reproduce it?

@nishit93-hub
Copy link
Author

No issue, I had resolved the issue by changing the Kind to cluster role and ClusterRoleBinding. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants