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

Has anyone tried to deploy this on OpenShift? #40

Closed
alberttwong opened this issue Feb 21, 2018 · 14 comments
Closed

Has anyone tried to deploy this on OpenShift? #40

alberttwong opened this issue Feb 21, 2018 · 14 comments

Comments

@alberttwong
Copy link
Contributor

Just curious.....

@osmancis
Copy link

osmancis commented May 9, 2018

I did and it works great.

@romancin
Copy link

I have been testing this, and kube-mokey container runs well in OpenShift, but it doesn't work with OpenShift deploymentConfig, only with kubernetes deployments. If you use kubernetes deployments, you loose the ability to use image streams, lifecycle hooks and custom deployment strategies, as stated in this document:
https://docs.openshift.com/container-platform/3.11/dev_guide/deployments/kubernetes_deployments.html#dev-guide-kubernetes-deployments-support

@alberttwong
Copy link
Contributor Author

@romancin How are you starting or loading the container in OCP?

@romancin
Copy link

romancin commented Jan 11, 2019 via email

@alberttwong
Copy link
Contributor Author

Can you share what you did? I take it that you're loading via yaml. I can look at why since I'm a Red Hatter that works on OCP.

@osmancis
Copy link

@romancin Can you make sure you defined the config map? I missed it first time I ran this K Monkey

@alberttwong
Copy link
Contributor Author

alberttwong commented Jan 11, 2019

For the issue,

error: couldn't get deployment kube-monkey-5: replicationcontrollers "kube-monkey-5" is forbidden: User "system:serviceaccount:kube-system:deployer" cannot get replicationcontrollers in the namespace "kube-system": User "system:serviceaccount:kube-system:deployer" cannot get replicationcontrollers in project "kube-system" 
oc -n kube-system adm policy add-role-to-user -z deployer system:deployer
oc -n kube-system adm policy add-role-to-user -z builder system:image-builder
oc -n kube-system adm policy add-role-to-group system:image-puller system:serviceaccounts:kube-system

@alberttwong
Copy link
Contributor Author

alberttwong commented Jan 11, 2019

Answer

git clone https://github.com/asobti/kube-monkey.git
cd examples
oc login http://someserver/ -u system:admin
oc project kube-system
oc create -f configmap.yaml
oc -n kube-system adm policy add-role-to-user -z deployer system:deployer
oc -n kube-system adm policy add-role-to-user -z builder system:image-builder
oc -n kube-system adm policy add-role-to-group system:image-puller system:serviceaccounts:kube-system
oc run kube-monkey --image=docker.io/ayushsobti/kube-monkey:v0.3.0 --command -- /kube-monkey -v=5 -log_dir=/var/log/kube-monkey
oc volume dc/kube-monkey --add --name=kubeconfigmap -m /etc/kube-monkey -t configmap --configmap-name=kube-monkey-config-map

@asobti
Copy link
Owner

asobti commented Jan 11, 2019

Fixed by #137

@alberttwong
Copy link
Contributor Author

FYI.. this is another effort. https://github.com/chaitanyaenr/kraken

@romancin
Copy link

romancin commented Jan 11, 2019 via email

@romancin
Copy link

romancin commented Jan 11, 2019 via email

@alberttwong
Copy link
Contributor Author

Sorry, but that is not the problem, as I said, kube-monkey is working well. The problem is that kube-monkey is searching for Deployments using the kubernetes api. When you use Openshift DeploymentConfig, kubernetes Deployments are not used, so kube-monkey thinks that it doesn’t have any pods to kill. If you do a kubectl get deployments on a Openshift cluster when you are using DeploymentConfigs, the output is empty.

So I miss understood. I thought you couldn't deploy kube-monkey in a DC configuration. Unfortunately you'd have to rewrite kube-monkey so that it understood OCP DC.

@loveshjain
Copy link

@alberttwong I deployed the kube-monkey like you mention on my openshift, but it does not seems to be working. Its giving me

I0531 04:04:08.061773 1 schedule.go:57] Status Update: 0 terminations scheduled today

When I did kubectl get deployments i got No resources found.

Any idea?

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

5 participants