Skip to content

*.k8s.orb.local domains in containers resolving to ipv6 addresses when ipv6 is disabled #1790

Description

@wjsl

Describe the bug

I have a deployment of a node application and keycloak for OAuth+SSO. The keycloak is intended to be pluggable, so we use the external domain names for interacting with it (ie, keycloak.k8s.orb.local). Noticed that the node app fails to connect to the service because an IPv6 address resolves for it.

From the container:

[node@ui-deployment-86bcd77f9-rtj6z ~]$ curl -kvvvvI https://keycloak.k8s.orb.local/
* Rebuilt URL to: https://keycloak.k8s.orb.local/
*   Trying fd07:b51a:cc66:0:cafe::3...
* TCP_NODELAY set
* connect to fd07:b51a:cc66:0:cafe::3 port 443 failed: Connection refused
*   Trying 198.19.248.3...

From the remote debugger for my app:

Image

My current workaround is to have node prefer IPv4, but I can't guarantee that will work when deployed to production environments.

I can't seem to find how the DNS is configured for Kubernetes to see where the v6 address comes from. All services are created as SingleStack IPv4.

Image

To Reproduce

  1. Deploy keycloak via helm as keycloak
  2. Deploy another app
  3. Open shell in the other app, run curl https://keycloak.k8s.orb.local
  4. Notice output

Expected behavior

I expect, if IPv6 is disabled, to not resolve domains to IPv6 addresses.

Diagnostic report (REQUIRED)

orbstack-diagreport_2025-02-19T20-28-54.965527Z.zip

Screenshots and additional context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    t/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions