-
Notifications
You must be signed in to change notification settings - Fork 295
Allow defining multiple k8s API endpoints with/without managed ELB #373
Comments
Hi @c-knowles @tarvip @spacepluk, could you confirm if this feature would resolve all of your use-cases including #281 and #281 (comment) and #343? |
apiEndpoints:
- dnsName: v2.k8s.external.example.com
loadBalancer:
hostedZone:
id: <id for the hosted zone external.example.com>
securityGroups:
- id: sg-toallowexternalaccess
- dnsName: v2.k8s.internal.example.com
loadBalancer:
hostedZone:
id: <id for the hosted zone internal.example.com>
securityGroups:
- id: sg-toallowinternalacess Here is something missing, how can I define that the latter one is internal ELB? I guess On the other hand I'm trying to understand what is the difference between |
I understand one problem is keeping DNS entry up to date. |
@tarvip ELB can be made accessible externally while API servers remain in the private subnet |
Ok. True, but for kubelet and kube-proxy DNS should be enough. |
Using ELB allows us to automatically remove non-functioning controller nodes from the API endpoint backed by a controller ELB. |
@tarvip Thanks for the feedbacks!
Yes and no. I did miss the "internal" here means that it is to where kubelets in worker nodes connect. On the other hand, "private: true" vs "private: false" means whether it should be within private subnets or public subnets. |
Ah, sorry. You can just transform |
I understood you had plan for that: Actually there are ways to update route53 record automatically according to ASG changes, but I think it is easier to stick to ELB. |
I guess you have to use separate option for that: |
No(for now)!
Could you share us options you're aware of? |
These options are based on cloudwatch events and lambda, e.g: https://aws.amazon.com/blogs/compute/building-a-dynamic-dns-for-route-53-using-cloudwatch-events-and-lambda/ |
@mumoshu I can confirm that this seems to resolve #343. I don't need the extreme examples with multiple ELBs etc but can see how people may wish for those. I wonder if it's possible to provide some separation so we don't need to directly support every case explicitly, a bit like we do with security groups and managed role ARNs (note, I had a look but haven't spotted a way to do it here yet). |
@mumoshu thanks! I think this adds a lot of flexibility. I'm planning on testing it next week. |
Considering to add worker:
apiEndpointName: v2.k8s.internal.example.com
apiEndpoints:
- dnsName: v2.k8s.external.example.com
loadBalancer:
hostedZone:
id: <id for the hosted zone external.example.com>
securityGroups:
- id: sg-toallowexternalaccess
- dnsName: v2.k8s.internal.example.com
loadBalancer:
hostedZone:
id: <id for the hosted zone internal.example.com>
securityGroups:
- id: sg-toallowinternalacess |
Could we designate one of them as the primary or internal one instead of needing the reference or do we need that flexibility?
|
@c-knowles Thanks as always for your feedback!
|
On the flip side, we'd need to add validation errors for when the user specifies an API endpoint that doesn't exist in their list of endpoints under e.g. in your above example if we changed worker to:
Is there a validation error or do we end up with 3 possible endpoints? |
Ah, sorry! I had mistakes in my last example. worker:
apiEndpointName: versionedInternalEndpoint
apiEndpoints:
- name: versionedExternalEndpoint
dnsName: v2.k8s.external.example.com
loadBalancer:
hostedZone:
id: <id for the hosted zone external.example.com>
securityGroups:
- id: sg-toallowexternalaccess
- name: versionedInternalEndpoint
dnsName: v2.k8s.internal.example.com
loadBalancer:
hostedZone:
id: <id for the hosted zone internal.example.com>
securityGroups:
- id: sg-toallowinternalacess And yes, an incorrect name in |
OK sure. My opinion is either way is fine because either way must provide validation rules and errors. So depends how verbose you wish the config to be I suppose. |
Got it. Thanks for your confirmation and suggestion 👍 |
Multi API endpoints & API endpoints without ELBs have been introduced via #468 |
Any progress with the DNS round-robin thing? |
@spacepluk No, sorry. Honestly I have been never considered to use DNS round-robin for this myself, due to lack of benefits(for me). Probably I'll be open to accept PRs though. |
Opened #1151 for the round-robin thing. Closing this the original issue was already resolved. |
Accordingly to use-cases:
This is intended to eventually resolve all the related issues #281 #285 #343
Configuration examples
cluster.yaml
after this feature is implemented would look like:and
and
and
If you'd like to just add alternate DNS names to a k8s api endpoint:
cc @c-knowles #343
If you'd like to choose Route53 round-robin rather than ELB for load-balancing:
cc @spacepluk #281
If you'd like to have both public and private ELBs for a k8s endpoint:
cc @tarvip #281 (comment)
In an extreme case it would even look like:
cc @c-knowles #343 & @spacepluk @tarvip #281
Types
Non-goals
cluster.yaml
acloudformation.yaml
, we won't support it.vpcId
andsecurityGroups[].id
The text was updated successfully, but these errors were encountered: