A reliable way to tell if Nomad client/server has joined a cluster without ACL?

Hello,

Is there a reliable way to determine if nomad (client or server) managed to join an existing cluster without possessing an ACL token?

We’re running Nomad under AWS AutoScalling Group and have a lifecycle hook which marks node as healthy if cluster was established. The hook executes locally on the instance, so it has file access.
At the moment we utilise the anonymous ACL with nomad status CLI exit code to determine that. While this works, we already had a few misses when we tweaked anonymous policy and broken the hook. Ideally we should be able to tell the status without any API access.

What’s our best alternative?

Hi @m1ke , would the /v1/agent/health endpoint work for you?

e.g. of a client that has not yet joined a cluster

{"client":{"ok":false,"message":"no known servers"}}
1 Like

Ah that could work, fantastic. Cheers!