N8n's own REST API access with basic auth

hello and sorry if this has been posted before; I have been finding confusing information (to write the least) on the n8n’s REST api authentication.
For example, according to this : Authenticating with the n8n REST API: A Comprehensive Guide - API n8n

there should be both API KEY based (via the X-N8N-API-KEY header), as well as basic authentication supported. It appears however that basic auth only works on the HTTP frontend, but not on the REST api interfaces.

My questions: has Basic auth been deprecated on n8n’s own REST API?

If the answer to the previous one is affirmative, what is the correct way to deploy N8N unsupervised / via devops (for example on kubernetes)?

Thank you and sorry if I re-raise this question, I could not find satisfactory answers yet..
PS: I am using the latest version of n8n

Yes. n8n removed support for Basic Auth and External JWT in version 1.0. These methods were replaced by mandatory User Management for the interface and specific API keys for the REST API [Migration Guide; User Management].

While some users previously used Basic Auth to protect the n8n frontend, it is no longer a supported method for authenticating calls to the Public REST API. To interact with the Public REST API, you must now use an API Key passed in the header as X-N8N-API-KEY [API Authentication].

Thank you for the quick reply!
I see, is there a way to set this api key / token value from the environment side? For example, the Basic Auth can be set, and actually works..
It’s quite unhandy for automated workflows to have to fetch a key from the main UI..,