Set up a bearer token outside of UI

I’m currently looking into running home assistant in a (minimal) kubernetes setup.

Kubernetes supports “readiness probes”, meaning that the currently running deployment will only get updated if the new one is ready.

In order for kubernetes to know the new deployment is ready, I am currently using an API call on the /api endpoint, requiring a bearer token.

While I can indeed just grab one from the UI, that would mean that my initial deploy would be without a readiness probe and that I need to manually grab that token and install it.

My question is thus, is there a way to generate the initial token in another (automated) way?

Another solution would be to use another approach to check whether the instance is running, but I’m not sure about that.

I’m also looking to do this. Have you found any solutions?

I didn’t find a way to set up a bearer token, but it turned out I didn’t need it.

I only needed a way to know the instance was running, so I did use an endpoint which didn’t require a bearer token; http://<hostname>/manifest.json'

Thanks for letting me know!