aws / containers-roadmap

This is the public roadmap for AWS container services (ECS, ECR, Fargate, and EKS).
https://aws.amazon.com/about-aws/whats-new/containers/
Other
5.18k stars 313 forks source link

EKS Feature Request: Control Plane to Associate Private Hosted Zone for Webhooks #1606

Open robisoh88 opened 2 years ago

robisoh88 commented 2 years ago

Community Note

Tell us about your request What do you want us to build?

The request is to allow an option for the control plane to use the cross account function to associate a private hosted zone in order to be able to resolve private hosted domain names.

Which service(s) is this request for? This could be EKS

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.

While using a MutatingWebhookConfiguration (or ValidatingWebhookConfiguration) that calls an off-cluster endpoint through a domain in a private hosted zone, the call fails as the master nodes cannot reach route53 private hosted zone. By default the Master nodes will reach out to the public resolver only as they are hosted and managed by AWS.

Without this function, off-cluster endpoints for MutatingWebhookConfiguration will need to be resolved through public DNS resolvers.

Are you currently working around this issue? How are you currently solving this problem?

Additional context Anything else we should know?

Error seen:

E1110 13:48:30.677965 1 replica_set.go:536] sync "default/web-xxxx.xxxx" failed with Internal error occurred: failed calling webhook "xxx.xxx.xxx": Post https://xxxx.xxxx:xxxx/xxxx/?timeout=10s: context deadline exceeded

MutatingWebhookConfiguration clientConfig snippet:


...
webhooks:
- name: xxx.xxx.xxx
  clientConfig:
    url: "https://xxxx.xxxx:xxxx/xxxx/"
    caBundle: ""
  sideEffects: None
  rules:

Attachments If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)

peterellisjones commented 1 year ago

We are also hitting this issue in another way:

Control Plane DNS resolution to a private hosted zone is required when configuring an OIDC provider that is deployed in the VPC and uses DNS in a private hosted zone. Our use-case for this (which I expect is a common use-case) is using Dex as a "portal" OIDC provider running on kubernetes itself - as the LB proxying traffic to Dex is in a private network using private DNS, the control plane cannot resolve the OIDC provider issuer URL.

jackivanov commented 1 year ago

It's been almost 2 years and we would love to see this issue at least on the roadmap

charmingnewt commented 1 year ago

We're also seeing this issue for webhooks and would like to see it on the roadmap.

pwn-sf commented 12 months ago

We are facing the same issue. Is this the ask here:

  1. Provide ability to add EKS vpc to private hosted zone?

My understanding is that private hosted zone in route53 takes a list of VPCs which have visibility into it. Or is it not that simple?

AbeOwlu commented 9 months ago

@robisoh88 if the webhook server is discoverable using private hosted zone;

pwn-sf commented 9 months ago

I think it is more about resolution of private hosted domain names. EKS control plane can not see the entries is all.

For my usecase, it limits the ability of EKS control plane to call an internal nlb.

akefirad commented 5 months ago

Yep. Our use case is to deploy Istio in a primary-remote setup (thereā€™s an eastwest LB that seems to have to be public šŸ˜”) Interestingly in my case, the LB host is resolvable but not reachable (because itā€™s ā€œinternalā€). So I guess itā€™s more than just DNS resolution.

pwn-sf commented 5 months ago

in my usecase, DNS resolution was the only issue. Making DNS visible was enough (although the IPs it was resolving to were private, as they belonged to an Internal LB)

gss2002 commented 4 months ago

@pwn-sf how did you make your dns visible to the control plane node for an internal lb that is resolvable via ec2 and containers running in eks?

E0214 13:12:58.904068 10 oidc.go:335] oidc authenticator: initializing plugin: Get "https://dex.eks.dbar.hdp.example.com/.well-known/openid-configuration": dial tcp: lookup dex.eks.dbar.hdp.example.com on 127.0.0.1:53: no such host

gss2002 commented 4 months ago

@pwn-sf how did you make your dns visible to the control plane node for an internal lb that is resolvable via ec2 and containers running in eks?

E0214 13:12:58.904068 10 oidc.go:335] oidc authenticator: initializing plugin: Get "https://dex.eks.dbar.hdp.example.com/.well-known/openid-configuration": dial tcp: lookup dex.eks.dbar.hdp.example.com on 127.0.0.1:53: no such host

Based on the case I opened with AWS today they said to ask for the feature enhancement here for the APIServer to be able to utilize a VPC's defined Route 53 Resolver/Route 53 privatezone

pwn-sf commented 4 months ago

did you make your dns visible to the control plane node for an internal lb

I tried with the DNS entry in a public route53 hosted zone. This way you will have the dns entry as public but it will resolve to private IPs (which is ok apparently as kube-apiserver is then able to connect to the IP of the internal LB)