Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cri: add configurable DNS servers for resolving registry hostnames#12951

Open
ChandonPierre wants to merge 2 commits intocontainerd:mainfrom
ChandonPierre:cpierre/dns
Open

cri: add configurable DNS servers for resolving registry hostnames#12951
ChandonPierre wants to merge 2 commits intocontainerd:mainfrom
ChandonPierre:cpierre/dns

Conversation

@ChandonPierre
Copy link

There are scenarios in which the default system resolver is undesirable for resolving an image host - I.E, a registry that's only resolvable via a private DNS server.

This PR adds a dns_servers config option that allows one to configure DNS servers that get passed into the dial context used for image pulls. If the configured DNS server is unreachable, resolution falls back to the default host resolver as determined by net.Resolver.Dial.

Here, we expose two configuration options:

Global configuration in config.toml:

  [plugins."io.containerd.cri.v1.images".registry]
    dns_servers = ["192.168.1.53"]

Per-host via hosts.toml, overriding the global if set for that host only:

  [host."https://registry.example.com"]
    capabilities = ["pull", "resolve"]
    dns_servers = ["192.168.1.53"]

@github-project-automation github-project-automation bot moved this to Needs Triage in Pull Request Review Feb 28, 2026
@dosubot dosubot bot added area/cri Container Runtime Interface (CRI) kind/feature labels Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cri Container Runtime Interface (CRI) kind/feature size/L

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants