Questions about Hashicorp Nomad which is a simple and flexible scheduler and orchestrator to deploy and manage containers and non-containerized applications across on-premises and clouds at scale.
Questions tagged [nomad]
189 questions
1
vote
0 answers
Nomad job: Optional template
Is there a way to make templates optional in Nomad job files?
If test.data does not exist in Consul KV I want the job to simply ignore the template.
Below example using keyOrDefault nearly does what I want but still creates an empty file in my…

lind3r
- 21
- 2
1
vote
1 answer
Envoy: connection refused (via Consul)
An Envoy Docker sidecar is deployed with each of our workload services (Nomad cluster, Docker deployments, private network of our own between our servers), and suppose to connect with a Consul service mesh.
Our service is correctly deployed and…

Bob
- 1,495
- 1
- 19
- 24
1
vote
0 answers
Hashicorp Nomad: Can't request Vault token for terminal allocation
I have a jobspec file with multiple tasks. One of which is a "poststop" task.
To be able to inject secrets from Vault, I defined the vault stanza on the task group level. The main task runs fine. However the poststop task fails with
"Can't request…

ThomasMX
- 1,643
- 2
- 19
- 35
1
vote
0 answers
Nomad - How to spread a job across nodes that all have the same metadata without using a constraint
I currently have this metadata in my clients
A row can have multiple columns and there is a machine on each row-col
So my meta data looks like this
meta
{
row = "1"
col = "3"
id = "12"
}
What I would like to do is spread this job over…

Rajeshwar
- 11,179
- 26
- 86
- 158
1
vote
1 answer
How Nomad knows internally about the allocation status of job (Running, Failed, Queued, Starting, Complete, Lost)?
Allocation status Screenshot
Hi team,
we can see about the allocation status of a job in nomad UI / command line.
but how nomad finds whether a job is running or it failed or it completed ?
Basically want to know how nomad figure out about…

Tapas Sahu
- 11
- 2
1
vote
0 answers
How to define config.logging for fluentd in nomad jobspec
I have a waypoint.hcl that completes a nomad jobspec.
I need to use fluentd to handle logging.
Here is a stripped, minimal example of a jobspec file. What values should I give env, tag, and labels?
job "${jobname}" {
type = "system"
group…

ChuckCottrill
- 4,360
- 2
- 24
- 42
1
vote
4 answers
How to change the default docker registry in HashiCorp nomad
I want to change the default docker registry configuration in nomad. I am setting up a nomad cluster in enterprise VM, which connects to frog artifcatory docker registry. Any docker hub images reference has to go through the internal artifactory…

Sanjeev Kumar
- 43
- 7
1
vote
2 answers
Scheduled termination of nomad job
I'm looking for analogue of nomad stop command which I can schedule from the job itself. Is there such a thing in Nomad? I failed to find anything which can do it. It looks like Nomad fundamentally only starting jobs, but stopping them is not…

Stas
- 1,707
- 15
- 25
1
vote
2 answers
Nomad to deploy a container with a file
I'm quite new to Nomad and i'm looking to deploy a docker container which contains a specific file. I know Nomad has a docker driver built in, so would this be the correct action to take: 1. create a dockerfile which copies the file I want 2. use…

Krist Manor
- 13
- 4
1
vote
1 answer
nomad consul traefik https
I have a go app that i need to run multiple instances under separate subdomains, i have a working nomad consul setup and got the go app to run and is accessible via a fixed ip address and dedicated port. But i am stuck on how to make it work with…

arnaud goudsmit
- 15
- 4
1
vote
1 answer
base64encode in Nomad job file not encoding value of variable
I'm trying to store the result of a base64encode inside an env block like so:
env {
HOST_ID = "${base64encode("${NOMAD_ADDR_serviceA}")}"
}
Which results in HOST_ID holding the base64 encoded string "${NOMAD_ADDR_serviceA}" and not the value of…

obviyus
- 134
- 1
- 9
1
vote
1 answer
Nomad Connect Two docker Containers
I am having trouble establishing communication between two docker containers via nomad. Containers are in the same task group but still unable to reach each other. Even when using NOMAD_ADDR_ environment variable. Can anyone help in this regard? I…

Zeeshan
- 21
- 4
1
vote
1 answer
Support for `volume_mount` in Nomad Podman task driver?
I am doing some proof of concept work using Nomad to orchestrate several different containers running on RHEL 8 hosts using Podman. I am using the Nomad Podman driver to execute my containers using Podman. I have shared state in the form of an…

Tim Dean
- 8,253
- 2
- 32
- 59
1
vote
1 answer
Reshaping Nomad metrics for Promethus
I'm trying to implement the new Nomad Autoscaler tool for our clusters so they can scale the EC2 instances as need and we already have Prometheus configured on all nodes of the cluster so we get metrics from Nomad. However, the metrics are very…

Prav
- 2,785
- 1
- 21
- 30
1
vote
1 answer
Log to ELK from Nomad without using container technology
We are using Hashicorp Nomad to run microservices on Windows. We experienced that allocations come and go, but we would like to have centralized logging solution (ideally ELK) for all logs from all jobs and tasks from multiple environments. It is…

Alan Sereb
- 2,358
- 2
- 17
- 31