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

RBAC errors #12

Open
davidk81 opened this issue Jul 15, 2019 · 1 comment
Open

RBAC errors #12

davidk81 opened this issue Jul 15, 2019 · 1 comment

Comments

@davidk81
Copy link

Not sure if this is the best way to set RBAC, but I got the API permission errors fixed by applying the following:

apiVersion: v1
kind: ServiceAccount
metadata:
  name: sqs-scaler
  namespace: ${K8S_NAMESPACE}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: sqs-scaler
  namespace: ${K8S_NAMESPACE}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: sqs-scaler
subjects:
- kind: ServiceAccount
  name: sqs-scaler
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: sqs-scaler
  namespace: ${K8S_NAMESPACE}
rules:
- apiGroups:
  - extensions
  - apps
  resources:
  - deployments
  - replicasets
  verbs:
  - get
  - list
  - watch
  - patch

(In k8s-sqs-autoscaler deployment)

...
    spec:
      serviceAccountName: sqs-scaler
...
@davidk81 davidk81 changed the title RBAC RBAC errors Jul 15, 2019
@rafilkmp3
Copy link

thanks for this man

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