Is it possible to use an external etcd cluster
Would it provide additional stability to run Etcd outside of the Kubernetes cluster? If so, how can we customize the etcd member list for kops would we be able to modify this with a kops edit cluster?
We do hot have the functionality at this point. Always happy to have contributions!
@chrislovecnm : This is a nice feature to have and much needed. Lots of people are having problems with etcd being filled to capacity and crashing and losing all of their data.
Could someone point me to the areas of the code and the files that need to be changed to make this feature possible?
@Cryptophobia if you want to ping me on slack you can.
Quick brain dump.
We would need to do the following items:
- Do you want kops to create the cluster as well or just use an external cluster?
- We would need to provide the capability for a kops / nodeup / protokube to not create an etcd cluster.
- API changes - /pkg/apis/kops
- protokube changes /protokube
- nodeup changes /nodeup
- Ensure that all components such as
kubeAPIServerhave needed configurations for connecting to etcd. - Integration testing
- Unit tests
- Documentation
I would like have kops to maintain, and upgrade etcd only servers as well.
I would love to see some priority on this. The Kubernetes documentation explicitly recommends that Kubernetes' state be kept on a separate, dedicated etcd cluster.
Keeping stable etcd clusters is critical to the stability of Kubernetes clusters. Therefore, run etcd clusters on dedicated machines or isolated environments for guaranteed resource requirements.
I was also perplexed to find that the etcd static pods created by kops are not even storing their state in PersistentVolumes, instead storing their state directly on the root volume of the master node. Although I guess that's a chicken-and-egg problem, since you need Kubernetes for PersistentVolumes, and you need etcd for Kubernetes.
I was also noticing that kops installed etcd 2.2.1. At some point, etcd 2 will be end-of-lifed, and then everyone will have to move their etcds to etcd v3. In my experience, their migration process just doesn't work, so it behooves everyone to start on etcd 3.
@geekofalltrades how do we get PVC's before k8s is started? We have a chicken and the egg problem with k8s, in both a recovery and bootstrapping situation. We already support etcd3, but install etcd2 by default.
We are completely open to having etcd externalized in kops, but there has never been someone who wants to code it. It is not even that complex. The one thing I would love to see is hard data on why having etcd is recommended. I have had many conversations about it, but nobody can example from a production stand-point or data-driven standpoint why I should be recommending putting etcd off of the cluster.
@chrislovecnm how do I change the etcd version?
@chrislovecnm , I would be willing to contribute in my free time and will ping you on slack to follow up on this.
The main argument is that all of k8s is dependent on the state of etcd cluster and when it is filled beyond capacity it crashes. It becomes a single point of failure for the whole cluster. Not to mention that routing and DNS other configurations depend on it.
@geekofalltrades we have etcd 3 version stuff under docs, it is not released quite yet. We do not support upgrading etcd yet.
External etcd is a requirement for my company's K8S setups, so this would be a very convenient little feature to have.
As long as I'm not stepping on any toes, I'll try to carve out some time to take a crack at it as well.
@clockworksoul have at it. A good place to start is an external etcd section in our API. I would just PR that and get feedback.
Any auto information will need to be handled as secrets.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale
/remove-lifecycle stale
/remove-lifecycle stale
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close
/remove-lifecycle rotten
I think this is still relevant.
/reopen /lifecycle frozen
@idealhack: Reopening this issue.
In response to this:
/reopen /lifecycle frozen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Where etcd is kept. I do an aws installation. It creates some files on S3. What are them ? And where real etcd is kept ?