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

switching from Deployment to StatefulSet due to persistent volumes #143

Open
triesz opened this issue Feb 6, 2019 · 2 comments
Open

switching from Deployment to StatefulSet due to persistent volumes #143

triesz opened this issue Feb 6, 2019 · 2 comments

Comments

@triesz
Copy link

triesz commented Feb 6, 2019

I have deployed jenkins based on this on a vanilla k8s on bare metal, using storageos.
Unfortunately I hit filesystem issues multiple times, then I learned that
kind: Deployment
is probably not the best when using persistent volumes.

should jenkins not be deployed as StatefulSet instead?

(I am currently trying to switch to StatefulSet, btw, jenkins UI comes up OK but the launched slave pods started to have DNS issues somehow...)

@viglesiasce
Copy link
Contributor

Jenkins doesn't scale out so in this case Deployment or StatefulSet of size 1 will have the same behavior since Jenkins doesn't require a static hostname.

@triesz
Copy link
Author

triesz commented Feb 7, 2019

huu I am super k8s-newbie to asses this myself, however, I was told that in case of Deployment kubernetes does not guarantee that only 1 pod is running. Did I understand this right?
(And in fact I did manage to somehow corrupt my persistent jenkins home fs somehow, as I was tuning memory settings and kept applying modified yamls over and over again...)

Anyhow, in case someone bumps into this I have just found a statefulset example here:
https://github.com/jenkinsci/kubernetes-plugin/tree/master/src/main/kubernetes

referenced from the kubernetes plugin doc:
https://github.com/jenkinsci/kubernetes-plugin/blob/master/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

2 participants