-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Multi-tenant Kubernetes setup #701
Comments
Okay, in theory some support is there. LokiTake a look at https://github.com/grafana/loki/blob/master/docs/operations.md#multi-tenancy, it describes how multi-tenancy is supposed to work in Loki. In reality this probably means you are going to run a proxy which exposes the Loki endpoint for every tenant and adds the GrafanaRegarding Grafana, you will probably want to use Organizations (https://grafana.com/docs/guides/basic_concepts/#organization) to provide multi tenancy. Every organization would add it's own LokiProxyEndpoint as a loki datasource. If this is not enough, every tenant could use it's own grafana instance. This should give you some hints to get started, let me know if any questions pop up! |
Hello @sh0rez , Do i need to use sidecar for supporting multi-tenant? |
Okay, I basically imagined the following:
Basically, AuthN is handled by the
|
And don't forget to make |
Hi @sh0rez, I have implemented little different. I have deployed Loki and promtail to separate namespace("monitoring") and deployed nginx reverse proxy in separate namespace("project1") and added org id header. I have configured Promtail Loki service URL as nginx URL. From Grafana i'm adding datasource URL as nginx URL instead of Loki URL. In this approach i'm using same Loki and Promtail for multiple tenant. But now i'm not sure how can i configure multiple client.url for promtail so that job A can push data to nginxA and job B can push data to nginx B. Any idea? |
We don't support this currently but this could be interesting to configure a different client per promtail job. |
@Kuqd Thank you for your reply. Is there any current alternative? Can sidecar approach be alternative? |
Yes I would say the sidecar might be a good alternative, never tried it. Let us know. |
@cyriltovena I was unsuccessful to configure Promtail as sidecar. Can you please me with basic example, it would be great to get started. Please help. |
@cyriltovena can you help me to implement different client per promtail job with org Id. I can change the source code as need with you guide. Please help to point which module I have change under promtail source code. |
I'd would like to think about a solution for everyone, give me some time to think about it. |
To me this issue make sense to support |
Yes sure. I'll try to implement your solution and create pull request here so that everyone can use. Thank you. Waiting for you solution. |
@cyriltovena Is any update to support on this topic? |
is it related to #259 ? |
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Hello,
I'm trying to setup Grafana in Kubernetes cluster. Kubernetes cluster will be used by multiple project team and one project team can't access other project team apps. We managed to setup Kubernetes by creating namespace per project and controlling the access level to specific namespace only. When i installed Grafana and Loki it gets installed cluster level. Now how can i setup Grafana and Loki to provide access at namespace level logs.
Thank you for your time!.
The text was updated successfully, but these errors were encountered: