Grafana loki logs for cluster

I want to get the deployments logs like when someone created a deployment or any activity we need that logs
what is the query for this or how can we do this

Can anyone answer please

Hi @vallabhanenisai1999 ,

if I understand your question correctly, you want to see logs about, for lack of a better term, Kubernetes resource lifecycle. Kubernetes API server is the component that probably would log this. As Kubernetes API server is part of the control plane, depending on how/where you use Kubernetes, you might not have direct access to these logs. E.g. AWS EKS does not allow direct access to the Kubernetes controller nodes.

So, the first step would be to make sure you collect Kubernetes API server logs and ship them to Loki. After that, it depends on the labels you have added to your Kubernetes API server logs…

How can we ship kubernetes api logs to loki
Can you please clarify that @b0b

What sort of Kubernetes cluster do you use?

deployment i am using aks
You understood my doubt right?

I have no experience with AKS. I think these are the logs you would need

Don’t know what the best way to get those into Loki would be.

Hey no i want kubernetes cluster deployement logs in grafana.
Like who deployed that deployment and who changed it? Or modified it like that i need

Unfortunately I can’t help you as I know nothing about how that is done in AKS…

In eks how to do that can you please tell

I don’t think we have this enabled anywhere but here is the documentation

I have one doubt on grafana on SMTP
Can you please clarify.