kops icon indicating copy to clipboard operation
kops copied to clipboard

WIP: fix for issue 17790

Open dezmodue opened this issue 3 weeks ago • 4 comments

As discussed in the kOps meeting yesterday, given a pod with HostNetwork and AnnotationNameDNSInternal we can use directly the pod IP to create the DNS names. Once this patch is applied the dns-controller correctly creates DNS entries for kops-controller and api internal endpoints:

I1205 10:18:18.568880       1 dnscontroller.go:586] Adding DNS changes to batch {A kops-controller.internal.ernie.example.com.} [10.101.18.248 10.101.53.90 10.101.64.234]

I1205 10:18:18.568937       1 dnscontroller.go:586] Adding DNS changes to batch {A api.internal.ernie.example.com.} [10.101.18.248 10.101.53.90 10.101.64.234]
and
❯ kubectl get nodes -o wide | awk '/control/ {print $6}'
10.101.53.90
10.101.18.248
10.101.64.234

Ping @justinsb as requested

dezmodue avatar Dec 05 '25 13:12 dezmodue

Hi @dezmodue. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

k8s-ci-robot avatar Dec 05 '25 13:12 k8s-ci-robot

/ok-to-test /assign @justinsb

hakman avatar Dec 05 '25 13:12 hakman

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from justinsb. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Dec 05 '25 14:12 k8s-ci-robot

Hi, I was wondering if the same issues are present for AnnotationNameDNSExternal as the dns-controller might create DNS entries that point to IPs that are associated with the node but not the pod itself (I cannot verify this). I could extend the PR to adopt the same logic also for AnnotationNameDNSExternal if that makes sense. @justinsb

dezmodue avatar Dec 10 '25 16:12 dezmodue

We are running this fix in our clusters and we've seen no issues over the last couple weeks. The time for a node to join the cluster is now consistently and reliably around 1 minute while before it could take over 10 minutes in the worst cases.

dezmodue avatar Dec 17 '25 20:12 dezmodue

@justinsb @hakman I added the suggested changes and some additional tests

  1. If the pod has a single IP just use that and avoid any calls to API
  2. Set record type correctly for IPv4 and IPv6

dezmodue avatar Dec 19 '25 12:12 dezmodue