KEMBAR78
addon: improve ingress-dns addon for windows and bump to v0.0.4 by kartikjoshi21 · Pull Request #21449 · kubernetes/minikube · GitHub
Skip to content

Conversation

@kartikjoshi21
Copy link
Contributor

Updated ingress-dns addon Pod template to align with current
deployment requirements:

  • Added hostPort mapping for UDP 53
  • Mounted ConfigMap for configurable DNS settings
  • Introduced dns-nodata-delay-ms option via ConfigMap
  • Switched default ingress-dns image reference from gcr.io/k8s-minikube/minikube-ingress-dns to kicbase/minikube-ingress-dns (multi-arch build available on Docker Hub).

  • Left legacy image mapping in aliyun_mirror.json for backward compatibility, while adding new kicbase mapping.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 28, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: kartikjoshi21 / name: Kartik Joshi (3af89a4)

@k8s-ci-robot
Copy link
Contributor

Welcome @kartikjoshi21!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 28, 2025
@k8s-ci-robot k8s-ci-robot requested review from nirs and prezha August 28, 2025 21:20
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 28, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @kartikjoshi21. Thanks for your PR.

I'm waiting for a kubernetes 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 k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 28, 2025
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 28, 2025
@kartikjoshi21
Copy link
Contributor Author

kartikjoshi21 commented Aug 28, 2025

Testing performed:

  1. Built the minikube binary with the latest changes.
  2. Created a new Minikube cluster.
  3. Enabled the ingress and ingress-dns addons.
  4. Deployed a sample workload to validate functionality.

Logs from the run are attached below.

PS C:\Users\kartikjoshi> .\minikube.exe start --driver=hyperv  --memory=3072 --cni=calico
* minikube v1.36.0 on Microsoft Windows 11 Enterprise 10.0.26100.4851 Build 26100.4851
* Using the hyperv driver based on user configuration
* Starting "minikube" primary control-plane node in "minikube" cluster
* Creating hyperv VM (CPUs=2, Memory=3072MB, Disk=20000MB) ...
! Failing to connect to https://registry.k8s.io/ from inside the minikube VM
* To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
* Preparing Kubernetes v1.34.0 on Docker 28.3.2 ...
* Configuring Calico (Container Networking Interface) ...
* Verifying Kubernetes components...
  - Using image gcr.io/k8s-minikube/storage-provisioner:v5
* Enabled addons: storage-provisioner, default-storageclass
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
PS C:\Users\kartikjoshi> kubectl get pods -A
NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE
kube-system   calico-kube-controllers-59556d9b4c-klg4h   1/1     Running   0          3m56s
kube-system   calico-node-kkr7p                          1/1     Running   0          3m57s
kube-system   coredns-66bc5c9577-7p98r                   1/1     Running   0          3m56s
kube-system   etcd-minikube                              1/1     Running   0          4m2s
kube-system   kube-apiserver-minikube                    1/1     Running   0          4m2s
kube-system   kube-controller-manager-minikube           1/1     Running   0          4m2s
kube-system   kube-proxy-qfxk6                           1/1     Running   0          3m57s
kube-system   kube-scheduler-minikube                    1/1     Running   0          4m2s
kube-system   storage-provisioner                        1/1     Running   0          3m50s
PS C:\Users\kartikjoshi> ^C
PS C:\Users\kartikjoshi> .\minikube.exe addons enable ingress
* ingress is an addon maintained by Kubernetes. For any concerns contact minikube on GitHub.
You can view the list of minikube maintainers at: https://github.com/kubernetes/minikube/blob/master/OWNERS
  - Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.6.1
  - Using image registry.k8s.io/ingress-nginx/controller:v1.13.1
  - Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.6.1
* Verifying ingress addon...
* The 'ingress' addon is enabled
PS C:\Users\kartikjoshi> .\minikube.exe addons enable ingress-dns
* ingress-dns is an addon maintained by minikube. For any concerns contact minikube on GitHub.
You can view the list of minikube maintainers at: https://github.com/kubernetes/minikube/blob/master/OWNERS
  - Using image docker.io/kicbase/minikube-ingress-dns:0.0.4
* The 'ingress-dns' addon is enabled
PS C:\Users\kartikjoshi> $minikubeIp = minikube ip
PS C:\Users\kartikjoshi> Get-DnsClientNrptRule | Where-Object {$_.Namespace -contains ".test"} | Remove-DnsClientNrptRule -ErrorAction SilentlyContinue

Confirm
Removing NRPT rule for namespace .test with
 DAEnable: Disabled,
 DnsSecValidationRequired: Disabled,
 NameEncoding: Disable
 NameServers: 172.25.127.132
 Do you want to continue?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
PS C:\Users\kartikjoshi> Add-DnsClientNrptRule -Namespace ".test" -NameServers $minikubeIp
PS C:\Users\kartikjoshi> Get-DnsClientNrptRule | Where-Object {$_.Namespace -contains ".test"}


Name                             : {B73E09B1-05ED-4A07-9B50-F408B1BDF05A}
Version                          : 2
Namespace                        : {.test}
IPsecCARestriction               :
DirectAccessDnsServers           :
DirectAccessEnabled              : False
DirectAccessProxyType            :
DirectAccessProxyName            :
DirectAccessQueryIPsecEncryption :
DirectAccessQueryIPsecRequired   :
NameServers                      : 172.29.205.96
DnsSecEnabled                    : False
DnsSecQueryIPsecEncryption       :
DnsSecQueryIPsecRequired         :
DnsSecValidationRequired         :
NameEncoding                     : Disable
DisplayName                      :
Comment                          :



PS C:\Users\kartikjoshi> Write-Host "`nCreating ingress resources (hello deployment, service, ingress)..."
>> $ingressYaml = @"
>> apiVersion: apps/v1
>> kind: Deployment
>> metadata:
>>   name: hello
>> spec:
>>   replicas: 1
>>   selector:
>>     matchLabels:
>>       app: hello
>>   template:
>>     metadata:
>>       labels:
>>         app: hello
>>     spec:
>>       containers:
>>       - name: hello
>>         image: nginx
>>         ports:
>>         - containerPort: 80
>> ---
>> apiVersion: v1
>> kind: Service
>> metadata:
>>   name: hello
>> spec:
>>   selector:
>>     app: hello
>>   ports:
>>   - protocol: TCP
>>     port: 80
>>     targetPort: 80
>>   type: ClusterIP
>> ---
>> apiVersion: networking.k8s.io/v1
>> kind: Ingress
>> metadata:
>>   name: hello-ingress
>>   annotations:
>>     nginx.ingress.kubernetes.io/rewrite-target: /
>> spec:
>>   rules:
>>   - host: foo.test
>>     http:
>>       paths:
>>       - path: /
>>         pathType: Prefix
>>         backend:
>>           service:
>>             name: hello
>>             port:
>>               number: 80
>> "@
>>
>> $tempYaml = "$env:TEMP\hello-ingress.yaml"
>> $ingressYaml | Out-File -Encoding utf8 $tempYaml
>> kubectl apply -f $tempYaml

Creating ingress resources (hello deployment, service, ingress)...
deployment.apps/hello created
service/hello created
ingress.networking.k8s.io/hello-ingress created
PS C:\Users\kartikjoshi> $testDomain = "foo.test"
>> $maxAttempts = 10
>> $attempt = 0
>> $success = $false
>>
>> Write-Host "`nTesting DNS resolution for $testDomain (up to $maxAttempts attempts)..."
>>
>> while (-not $success -and $attempt -lt $maxAttempts) {
>>     $attempt++
>>     Write-Host "Attempt $attempt of $maxAttempts..."
>>     try {
>>         $result = Resolve-DnsName $testDomain -ErrorAction Stop                                                                                  >>         Write-Host "`nDNS resolution successful!"                                                                                                >>         $result | Format-Table Name, IPAddress -AutoSize                                                                                         >>         $success = $true                                                                                                                         >>     } catch {
>>         Write-Warning "Resolution failed; retrying in 5 seconds..."
>>         Start-Sleep -Seconds 5
>>     }
>> }
>>
>> if (-not $success) {
>>     Write-Error "`nCould not resolve $testDomain after $maxAttempts attempts. Please check NRPT, ingress-dns, or network settings."
>>     exit 1
>> }

Testing DNS resolution for foo.test (up to 10 attempts)...
Attempt 1 of 10...

DNS resolution successful!

Name     IPAddress
----     ---------
foo.test 172.29.205.96


PS C:\Users\kartikjoshi> Write-Host "`nTesting HTTP request to http://$testDomain ..."
>> try {
>>     $response = Invoke-WebRequest -Uri "http://$testDomain" -UseBasicParsing -TimeoutSec 10
>>     if ($response.StatusCode -eq 200) {
>>         Write-Host "`nSuccess! HTTP 200 OK received from NGINX ingress:"
>>         $response.StatusDescription
>>     } else {
>>         Write-Warning "Unexpected HTTP status: $($response.StatusCode)"
>>     }
>> } catch {
>>     Write-Error "HTTP request failed: $_"
>> }

Testing HTTP request to http://foo.test ...

Success! HTTP 200 OK received from NGINX ingress:
OK
PS C:\Users\kartikjoshi>
PS C:\Users\kartikjoshi> kubectl get pods -A
NAMESPACE       NAME                                        READY   STATUS      RESTARTS   AGE
default         hello-7456c76849-qbnvq                      1/1     Running     0          48s
ingress-nginx   ingress-nginx-admission-create-fr86g        0/1     Completed   0          3m20s
ingress-nginx   ingress-nginx-admission-patch-74c2r         0/1     Completed   0          3m20s
ingress-nginx   ingress-nginx-controller-6f7486bb86-xfd98   1/1     Running     0          3m20s
kube-system     calico-kube-controllers-59556d9b4c-klg4h    1/1     Running     0          7m57s
kube-system     calico-node-kkr7p                           1/1     Running     0          7m58s
kube-system     coredns-66bc5c9577-7p98r                    1/1     Running     0          7m57s
kube-system     etcd-minikube                               1/1     Running     0          8m3s
kube-system     kube-apiserver-minikube                     1/1     Running     0          8m3s
kube-system     kube-controller-manager-minikube            1/1     Running     0          8m3s
kube-system     kube-ingress-dns-minikube                   1/1     Running     0          2m22s
kube-system     kube-proxy-qfxk6                            1/1     Running     0          7m58s
kube-system     kube-scheduler-minikube                     1/1     Running     0          8m3s
kube-system     storage-provisioner                         1/1     Running     0          7m51s

@medyagh medyagh changed the title addons: update ingress-dns addon template and image reference addons: update ingress-dns addon to v0.0.4 Aug 29, 2025
@medyagh medyagh changed the title addons: update ingress-dns addon to v0.0.4 addon: update ingress-dns addon to v0.0.4 Aug 29, 2025
@medyagh medyagh changed the title addon: update ingress-dns addon to v0.0.4 addon: improve ingress-dns addon for windows and bump to v0.0.4 Aug 29, 2025
Updated ingress-dns addon Pod template to align with current
  deployment requirements:
  * Added hostPort mapping for UDP 53
  * Mounted ConfigMap for configurable DNS settings
  * Introduced dns-nodata-delay-ms option via ConfigMap

- Switched default ingress-dns image reference from
  gcr.io/k8s-minikube/minikube-ingress-dns to
  kicbase/minikube-ingress-dns (multi-arch build available
  on Docker Hub).

- Left legacy image mapping in aliyun_mirror.json for
  backward compatibility, while adding new kicbase mapping.

Signed-off-by: Kartik Joshi <karikjoshi21@gmail.com>
@kartikjoshi21 kartikjoshi21 force-pushed the kartikjoshi21/minikube-ingress-dns branch from 06a76d2 to 3af89a4 Compare September 1, 2025 09:59
@medyagh
Copy link
Member

medyagh commented Sep 2, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 2, 2025
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21449 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 49.9s    │ 50.2s                  │
│ enable ingress │ 16.6s    │ 18.1s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube start: 48.5s 50.7s 47.8s 49.3s 53.2s
Times for minikube (PR 21449) start: 49.4s 50.7s 50.0s 49.1s 51.8s

Times for minikube ingress: 15.8s 15.9s 16.9s 16.8s 17.4s
Times for minikube (PR 21449) ingress: 16.9s 16.9s 19.8s 19.9s 16.9s

docker driver with docker runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21449 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 24.9s    │ 24.9s                  │
│ enable ingress │ 14.8s    │ 13.6s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube start: 24.3s 24.3s 28.1s 21.9s 25.9s
Times for minikube (PR 21449) start: 25.1s 24.1s 26.7s 22.0s 26.6s

Times for minikube ingress: 13.2s 18.7s 13.7s 13.7s 14.7s
Times for minikube (PR 21449) ingress: 13.7s 14.2s 13.2s 13.1s 13.6s

docker driver with containerd runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21449 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 23.4s    │ 23.5s                  │
│ enable ingress │ 25.3s    │ 27.8s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube start: 24.7s 24.0s 23.3s 22.5s 22.5s
Times for minikube (PR 21449) start: 24.2s 26.3s 22.2s 22.1s 22.5s

Times for minikube ingress: 23.7s 23.6s 23.7s 31.2s 24.2s
Times for minikube (PR 21449) ingress: 43.6s 23.7s 24.1s 24.2s 23.2s

@medyagh
Copy link
Member

medyagh commented Sep 2, 2025

/lgtm thank you @kartikjoshi21

@medyagh
Copy link
Member

medyagh commented Sep 2, 2025

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kartikjoshi21, medyagh

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

The pull request process is described 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

@medyagh medyagh merged commit f4f9191 into kubernetes:master Sep 2, 2025
34 of 44 checks passed
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants