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

API Server host is resolved to its ipv6 and not to its ipv4 #1661

Open
jobcespedes opened this issue Apr 19, 2024 · 3 comments
Open

API Server host is resolved to its ipv6 and not to its ipv4 #1661

jobcespedes opened this issue Apr 19, 2024 · 3 comments

Comments

@jobcespedes
Copy link

jobcespedes commented Apr 19, 2024

Describe the bug
The client tries to connect to the API Server and fails. In EKS with IPv6, API Server is only available in its IPv4 address. However, the client does not seem to fallback to the API Server ipv4. The error is:

request to https://somenumber.gr7.us-east-1.eks.amazonaws.com/apis/lms.krestomat.io/v1alpha1/lmsmoodles failed, reason: connect ETIMEDOUT 64:ff9b::a00:911c:443

** Client Version **
1.0.0-rc4

** Server Version **
1.29.3

To Reproduce

  • EKS IPv6 cluster
  • Call API server endpoint using the javascript client

Expected behavior
IPv4 is use if IPv6 is not accesible. Or at least it can be configured to use ipv4 resolution

Environment (please complete the following information):

  • OS: Centos Stream 9
  • NodeJS Version: 18
  • Cloud runtime: EKS
@brendandburns
Copy link
Contributor

I don't think that this is inside this client.

@jobcespedes
Copy link
Author

You might be right. It seemed like an infra issue in EKS. Nonetheless, some troubleshooting findings suggested it was the client or node server: I used curl to make a request to the API Server endpoint in the same container node server and the client are running. With verbose output, it resolved to IPv6 and then IPv4 address and the request was successful. However, using explicit resolve option with the IPv6 address, curl also timeout. However, the error message reported above by the function calling the client seems to indicate the client is only trying the IPv6 address of the API server. Unfortunately, EKS API server does not work with its ipv6 address, despite one being assigned.

@jobcespedes
Copy link
Author

jobcespedes commented Apr 20, 2024

Currently lookin at node option autoSelectFamily: true from https://nodejs.org/docs/latest-v18.x/api/net.html#socketconnectoptions-connectlistener; or --dns-result-order=ipv4first

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