Containers and the Kubernetes node can't reach Docker Hub: IPv6 "Network unreachable" and TLS handshake timeout pulling rancher/mirrored-pause:3.10.2

Open
#932 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, kubernetes, macos, rust
Domain
networking

Research direction

The failure is IPv6 routing from inside containers and the k3s node: AAAA answers are returned but there is no IPv6 route, so connections fail with "Network unreachable" and the node times out on TLS. Start with the network setup for the Kiri VM and container bridge, and compare it with the engine's own pull path, which works. Reproduce with curl -sv https://registry-1.docker.io/v2/ and curl -4 in a container. Done when containers and the node reach Docker Hub over the working address family and the pause image pulls.

Written by the indexing model from the issue text.

Description

bug
Kiri version and system

macOS27 Apple Silicon

What you did

Kiri version and system

  • Host: macOS

What you did
Ran a workload on Kiri's Kubernetes. Pods never start because the node can't pull the pause image.

What happened

Warning  FailedCreatePodSandBox  4m49s (x60 over 70m)  kubelet  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to pull image "rancher/mirrored-pause:3.10.2": failed to pull and unpack image "docker.io/rancher/mirrored-pause:3.10.2": failed to resolve reference "docker.io/rancher/mirrored-pause:3.10.2": failed to do request: Head "https://registry-1.docker.io/v2/rancher/mirrored-pause/manifests/3.10.2": net/http: TLS handshake timeout

To rule Kubernetes out, I ran the same request from a regular container. The engine pulled curlimages/curl from Docker Hub without trouble, but the container itself can't reach Docker Hub:

$ docker --context kiri run --rm curlimages/curl -sv https://registry-1.docker.io/v2/ -o /dev/null
*   Trying [2600:1f18:2148:bc02:83ed:319:27fc:162]:443...
* Immediate connect fail for 2600:1f18:2148:bc02:83ed:319:27fc:162: Network unreachable
* connect to 2600:1f18:2148:bc02:83ed:319:27fc:162 port 443 from :: port 0 failed: Network unreachable
*   Trying [2600:1f18:2148:bc01:a006:7c50:ab6f:3fd4]:443...

(The output stops there; I can add the rest and a curl -4 run if useful.)

What I expected
Containers and the Kubernetes node reach Docker Hub the same way the engine's own pulls do. Image pulls by the engine work, but traffic from inside containers and the k3s node doesn't.

Anything else

  • Containers get AAAA answers but have no IPv6 route, so connections try IPv6 first and fail. The k3s node's pull ends in a TLS handshake timeout.
  • Possibly related: #381, #288, #350.
What happened
$ docker --context kiri run --rm curlimages/curl -sv https://registry-1.docker.io/v2/ -o /dev/null
*   Trying [2600:1f18:2148:bc02:83ed:319:27fc:162]:443...
* Immediate connect fail for 2600:1f18:2148:bc02:83ed:319:27fc:162: Network unreachable
* connect to 2600:1f18:2148:bc02:83ed:319:27fc:162 port 443 from :: port 0 failed: Network unreachable
*   Trying [2600:1f18:2148:bc01:a006:7c50:ab6f:3fd4]:443...
What you expected instead

It should work !

Anything else

No response

Dominant language
Rust
Stars
7.5k
Forks
329
Avg merge
10h 44m
Merged PRs (30d)
347

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libracoder/kiri

All issues in libracoder/kiri

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.