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

Support DNS SRV for external etcd endpoints discovery #1933

Closed
YanzheL opened this issue Nov 23, 2019 · 6 comments
Closed

Support DNS SRV for external etcd endpoints discovery #1933

YanzheL opened this issue Nov 23, 2019 · 6 comments
Labels
area/etcd kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Milestone

Comments

@YanzheL
Copy link

YanzheL commented Nov 23, 2019

Is this a request for help?

no

What keywords did you search in kubeadm issues before filing this one?

external etcd, DNS SRV

Is this a BUG REPORT or FEATURE REQUEST?

FEATURE REQUEST

Versions

kubeadm version (use kubeadm version): 1.16.3

Environment:

  • Kubernetes version (use kubectl version): 1.16.3

What happened?

Currently, we can configure external etcd endpoints in kubeadm-config.yaml like this

apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
...
etcd:
    external:
        endpoints:
        - https://ETCD_0_IP:2379
        - https://ETCD_1_IP:2379
        - https://ETCD_2_IP:2379
....

It needs me to provide all endpoints of external etcd cluster nodes, which lacks a mechanism of "auto discovery".

What you expected to happen?

Inspired by etcd cluster DNS discovery, etcd cluster nodes support DNS SRV lookup via etcd argument --discovery-srv etcd.example.com to discover other nodes, I suggest that kubeadm can use a similar way to discover external etcd endpoints.

For example:

...
etcd:
    external:
        endpoints:
        - srv://etcd.example.com
....

Anything else we need to know?

Their implementation for this feature: etcd-io/etcd#8281

@neolit123
Copy link
Member

neolit123 commented Nov 23, 2019

hi, this request is related to:
#1598
but for external etcd.

It needs me to provide all endpoints of external etcd cluster nodes, which lacks a mechanism of "auto discovery".

you can also put your external etcd nodes behind a load balancer and only list the LB endpoint instead of all the members.

AFAIK, this will not work:

etcd:
    external:
        endpoints:
        - srv://etcd.example.com

because in the case of external etcd the list of endpoints (or a single LB) are simply passed on the kube-apiserver with (TLS ensured). for external etcd kubeadm does not manage etcd members and the DNS discovery.

this feels to me like a feature request for the kube-apiserver.

i'm going to keep this open for a discussion, but i don't think there is much we can do on the kubeadm side.

@kubernetes/sig-cluster-lifecycle

@neolit123 neolit123 added area/etcd kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Nov 23, 2019
@neolit123 neolit123 added this to the v1.18 milestone Nov 23, 2019
@YanzheL
Copy link
Author

YanzheL commented Nov 23, 2019

Thanks.
I understand I can use load balancer, but it brings more complexity to setup a LB.

In a simple case without load balancer, it'd be better if we can just use DNS discovery, so we don't need to change the kubeadm config every time when a new etcd member joins the cluster.
The member change in etcd cluster shouldn't affect the kubeadm config.

@neolit123
Copy link
Member

neolit123 commented Nov 23, 2019 via email

@neolit123
Copy link
Member

The dns srv must be passed to the kube-apiserver and i dont think it
supports it currently.

to confirm that you can go to the k8s slack channel #sig-api-machinery and ask there if the kube-apiserver supports this. i don't think it does, which means that we can't do much on the kubeadm side as the api server still needs a list of etcd members URLs.

@neolit123
Copy link
Member

/close
please re-open ionce the above question is answered.

@k8s-ci-robot
Copy link
Contributor

@neolit123: Closing this issue.

In response to this:

/close
please re-open ionce the above question is answered.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/etcd kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

3 participants