Nomploy Nomad Packs

← All packs

coredns v0.1.0

Networking

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.

nomad-pack run coredns --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- coredns

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task dns 53 image coredns/coredns:latest tracks :latest image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run coredns -f values.hcl --registry nomploy
# 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
  }
NameTypeDefaultDescription
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.
Readme

coredns

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).

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run coredns --registry=nomploy

Configure

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 enables log/errors/health. For anything richer (local zones with the file/hosts plugins, ad-blocking, per-domain routing), set corefile to 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 with constraints if clients target a specific node.