Is it possible to host nomad server on Kubernetes/Openshift

Team,

Is it possible to host nomad server on kubernetes or Openshift and node clients on windows. Is it possible to enable connectivity between them.

If yes, how to host nomad server as container in pod. Is there any compiled image already available.

Kindly suggest.

Thank you

There is no supported method I am aware of hosting Nomad Servers as a container or pod.

You can have a server run as a client as well by appending the server stanza to a client agent configuration.

This would allow the x number of Nomad nodes acting as a client on windows be servers as well. This may solve you problem space currently.

Not supported, but the question was “possible”, right. Kelsey did it in the past:

Oh ok… Let say, we have 2 machines. So on one machine hosting nomad both as client and server. I would add node_class tab in client stanza for logically grouping.

Am I correct here?

Thanks for sharing… I have checked this earlier but I am unable to get that how clients are connecting server through external load balancer which is specified in the block diagram.

Are they connecting through a specific Public IP which generally external load balancer expose. But major thing to know here is it possible to expose rpc services on this IP. Because all the serf/health services will flow over gRPC.

How I run a server and client on the same node.

Below is an example of my server.hcl. I bind Nomad to a my internal interface and the ELB will talk to it.

bind_addr = "0.0.0.0"
advertise  {
  http = "X:4646"
  rpc = "Y:4647"
  serf = "Z:4648"
}
data_dir = "/opt/nomad/data"
datacenter = "DC1"
region = "prod"
enable_syslog = "true"
syslog_facility = "LOCAL0"
log_level = "INFO"
server {
  enabled          = true
  bootstrap_expect = 1
  authoritative_region = "prod"
}
client {
  enabled = true
}

You can control what Nomad is advertised on with the bind address and what you communicate over with advertise address.

Sorry - I may be missing something here.

Thanks a lot for sharing… But the machine where I’m planning to run is 2 core and 4 gb ram. My use case is very small in which I have to run 1 go lang based exe on the client machines and no other software will be running in continuous mode.

Still, is it possible to run nomad, both as server and client, on the same machine which has such less resources.

Officially our documented hardware requirements are here: https://www.nomadproject.io/docs/install/production/requirements

You can run Nomad on less if needed but depends on many things. Given that you’re running a single node that hosts both server and client roles - indicates that you may not be using this in production environments.

Further to this - please look at job reservations around cpu and memory to ensure you your workload uses the expected amount of resources.

Oh ok. got it. Yes it is a very light weight application I can assign resources accordingly.

Thank you for the help :slight_smile:

1 Like