You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Containers run under Kubernetes cannot resolve host.docker.internal nor custom addresses specified using the --dns-host flag. This only happens within Kubernetes; similar containers running at the Docker layer have no problems resolving these addresses. This only happens when --vm-type=vz is specified; DNS resolution works as expected when --vm-type=qemu is used.
Version
colima version v0.6.7
git commit: ba1be00
WARN[0000] cannot detect current running executable: error looking up 'colima-Darwin-arm64' in PATH: exec: "colima-Darwin-arm64": executable file not found in $PATH
WARN[0000] falling back to first CLI argument
kubernetes
Client Version: v1.26.13
Kustomize Version: v4.5.7
Server Version: v1.28.3+k3s2
limactl version 0.19.1
qemu-img version 8.2.0
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
Operating System
macOS Intel <= 13 (Ventura)
macOS Intel >= 14 (Sonoma)
Apple Silicon <= 13 (Ventura)
Apple Silicon >= 14 (Sonoma)
Linux
Output of colima status
WARN[0000] cannot detect current running executable: error looking up 'colima-Darwin-arm64' in PATH: exec: "colima-Darwin-arm64": executable file not found in $PATH
WARN[0000] falling back to first CLI argument
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] address: 192.168.107.2
INFO[0000] socket: unix:///Users/peter/.colima/default/docker.sock
INFO[0000] kubernetes: enabled
Reproduction Steps
Start from a fresh state: run colima delete to clear any lingering state. Maybe not necessary, but better to be sure.
Start Colima specifying a VZ VM. Optionally include additional DNS hosts.
host.docker.internal fails with NXDOMAIN; our injected foo.bar comes back with no results; resolution of ordinary domains such as github.com work as normal.
Restart VM; repeat DNS requests using Alpine Docker container. Restart seems to be needed otherwise Docker resolutions sometimes fail too for a short while (cacheing maybe?).
FYI, I recently figured out that this was caused by a default template that I had created using a very old version of Colima that no longer works in newer versions. The DNS issue was resolved for me by deleting the offending template file
rm ~/.colima/_templates/default.yaml
I've filed #1192 to improve usability of the templates system.
Description
Containers run under Kubernetes cannot resolve
host.docker.internal
nor custom addresses specified using the--dns-host
flag. This only happens within Kubernetes; similar containers running at the Docker layer have no problems resolving these addresses. This only happens when--vm-type=vz
is specified; DNS resolution works as expected when--vm-type=qemu
is used.Version
colima version v0.6.7
git commit: ba1be00
WARN[0000] cannot detect current running executable: error looking up 'colima-Darwin-arm64' in PATH: exec: "colima-Darwin-arm64": executable file not found in $PATH
WARN[0000] falling back to first CLI argument
runtime: docker
arch: aarch64
client: v23.0.5
server: v24.0.7
kubernetes
Client Version: v1.26.13
Kustomize Version: v4.5.7
Server Version: v1.28.3+k3s2
limactl version 0.19.1
qemu-img version 8.2.0
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
Operating System
Output of
colima status
WARN[0000] cannot detect current running executable: error looking up 'colima-Darwin-arm64' in PATH: exec: "colima-Darwin-arm64": executable file not found in $PATH
WARN[0000] falling back to first CLI argument
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] address: 192.168.107.2
INFO[0000] socket: unix:///Users/peter/.colima/default/docker.sock
INFO[0000] kubernetes: enabled
Reproduction Steps
colima delete
to clear any lingering state. Maybe not necessary, but better to be sure.host.docker.internal
fails withNXDOMAIN
; our injectedfoo.bar
comes back with no results; resolution of ordinary domains such asgithub.com
work as normal.Resolutions seem to be working at the Docker layer. Our pod is still around, we can try the resolutions there again, but they still fail.
Expected behaviour
My expectations had been:
host.docker.internal
resolves to192.168.5.2
--dns-host
apply to all containers. In the above casefoo.bar
returns a result of192.168.5.2
.Additional context
No response
The text was updated successfully, but these errors were encountered: