Does Nomad have a concept of a static allocation?

Does the Nomad agent have the ability to create a “static allocation”, similar to a static pod in Kubernetes? Basically, I’m wanting to run an agent that is not connected to a server and simply point it to a local file or http endpoint that can tell to run an allocation.

Hi @Bpoe. Thanks for using Nomad.

I don’t think there is an explicit concept like you are describing here, but if I understand your use case correctly I think you could accomplish your goal pretty easily. Given that agents can run as both a server and a client you could:

  • Add a server stanza to your config hcl with bootstrap_expect=1
  • Add a client stanza with the agent IP in the server block
  • Write a service that watches the file or endpoint and uses the API package to submit the job to run the allocation.
  • Deploy that service as a system job so that it is always running.

If I understand your use case, I think that would achieve what you are trying to do. If that doesn’t seem right, could you tell me more about your use case?