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

kube monkey permission issue #113

Closed
prageethw opened this issue Nov 15, 2018 · 10 comments
Closed

kube monkey permission issue #113

prageethw opened this issue Nov 15, 2018 · 10 comments

Comments

@prageethw
Copy link
Contributor

Failed to fetch eligible deployments for namespace due to error: deployments.apps is forbidden: User "system:serviceaccount:kube-system:default" cannot list deployments.apps at the cluster scope

@prageethw
Copy link
Contributor Author

my pr number 109 should have fixed this, just raising for tracking

@asobti
Copy link
Owner

asobti commented Nov 16, 2018

Does this only happen when using the helm chart for deployment?

@prageethw
Copy link
Contributor Author

prageethw commented Nov 17, 2018

@asobti that's right. i saw it only when used with helm charts, hence I added rbac.yaml to fix the issue...

@prageethw
Copy link
Contributor Author

closed

@richabhatia20
Copy link

@asobti I'm getting this issue when running my k8s cluster on AWS EC2. My app is running in namespace 'dev' and Kube monkey is running in namespace 'kube-system'. The configmap is in kube-system too.

Here's the full error :

Failed to fetch eligible deployments for namespace dev due to error: deployments.apps is forbidden: User "system:serviceaccount:kube-system:default" cannot list deployments.apps in the namespace "dev"

@prageethw
Copy link
Contributor Author

@richabhatia20 did you use helm to install it?

@richabhatia20
Copy link

@prageethw No I just used the docker image

@prageethw
Copy link
Contributor Author

prageethw commented Dec 6, 2018

@richabhatia20
you need to create a service account that has rights to access other namespaces and run monkey with that service account... otherwise, use helm to install as it will do the magic in the background.

@richabhatia20
Copy link

@prageethw I did create the service account as suggested on fnproject/fn-helm#21 but it didnt help.

@prageethw
Copy link
Contributor Author

prageethw commented Dec 7, 2018

@richabhatia20

unfortunately, you are not running monkey with RBAC using service account?

##################

Install Tiller

##################

kubectl create
-f https://raw.githubusercontent.com/prageethw/k8s-specs/master/helm/tiller-rbac.yml
--record --save-config

helm init --service-account tiller

kubectl -n kube-system rollout status deploy tiller-deploy

##################

Run monkey

##################

cd kube-monkey

helm install --name my-release helm/kubemonkey

refer to this readme, still pending merge to master but will give a better handle

https://github.com/prageethw/kube-monkey/blob/master/helm/kubemonkey/ReadMe.MD

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

3 participants