CoreDNS — a fast, pluggable DNS server (the Kubernetes default) configured with a simple Corefile. Runs as a caching forwarder out of the box. Deployed as a single host-networked Nomad service.
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 14.3k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "coredns"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The CoreDNS container image. Pin a tag in production.
image = "coredns/coredns:latest"
# DNS port (TCP + UDP).
port = 53
# Upstream DNS servers to forward to, space-separated (used in the generated Corefile).
upstreams = "1.1.1.1 9.9.9.9"
# Optional full Corefile contents. Leave empty to use the generated caching-forwarder config; set this to take full control (blocklists, hosts, custom zones, etc.).
corefile = ""
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 300
memory = 256
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "coredns" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "coredns/coredns:latest" | The CoreDNS container image. Pin a tag in production. |
| port | number | 53 | DNS port (TCP + UDP). |
| upstreams | string | "1.1.1.1 9.9.9.9" | Upstream DNS servers to forward to, space-separated (used in the generated Corefile). |
| corefile | string | "" | Optional full Corefile contents. Leave empty to use the generated caching-forwarder config; set this to take full control (blocklists, hosts, custom zones, etc.). |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 300
memory = 256
} | The task resources. |
No variables match.
CoreDNS — a fast, flexible, plugin-based DNS server (the default DNS in Kubernetes). This pack ships it as a caching forwarder out of the box, and lets you drop in your own Corefile for split-horizon DNS, local zones, hosts entries, ad-blocking and more.
Single host-networked Nomad service. The Corefile is generated from your variables (no volume needed).
nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run coredns --registry=nomploy
| Variable | Default | Description |
|---|---|---|
port |
53 |
DNS port (TCP + UDP). |
upstreams |
1.1.1.1 9.9.9.9 |
Upstream resolvers the default Corefile forwards to. |
corefile |
"" |
Full custom Corefile contents. Empty = the generated caching-forwarder config. |
image |
coredns/coredns:latest |
Container image. Pin a tag in production. |
resources |
{ cpu = 300, memory = 256 } |
Task resources. |
The default config forwards all queries to
upstreams, caches, and enableslog/errors/health. For anything richer (local zones with thefile/hostsplugins, ad-blocking, per-domain routing), setcorefileto your own Corefile. Port 53 must be free on the node — disable a host resolver (e.g.systemd-resolved) if it's bound there. Pin the job withconstraintsif clients target a specific node.