This repository is a reference to configuring mtls between nomad client and server
This guide provides the steps to run a local, mTLS-enabled Nomad cluster using the provided Docker Compose configuration.
- Docker & Docker Compose
- Nomad CLI
Run the following commands from the project root to generate the necessary TLS certificates and move them into the certs/ directory.
nomad tls ca createnomad tls cert create -server -additional-dnsname=nomad-servernomad tls cert create -clientmv *.pem certs/Launch the Nomad server and client containers in the background.
docker-compose up -dConfigure your terminal to communicate with the secure cluster, then check the node status.
export NOMAD_ADDR="[https://127.0.0.1:4646](https://127.0.0.1:4646)"
export NOMAD_CACERT="$(pwd)/certs/nomad-agent-ca.pem"
export NOMAD_CLIENT_CERT="$(pwd)/certs/global-client-nomad.pem"
export NOMAD_CLIENT_KEY="$(pwd)/certs/global-client-nomad-key.pem"nomad node status
You should see the following output, indicating the client is ready:
ID Node Pool DC Name Class Drain Eligibility Status
<node-id> default dc1 <container-name> <none> false eligible readyStop and remove the cluster containers.
docker-compose down