amazon-web-serviceskubernetesgoogle-kubernetes-enginekubernetes-pod

How to change the log level of a kubernetes pod?


when i give

kubectl logs <pod-name>

it give logs of the pod whose level is set to info how can i change this log level(both before Deployment and after deployment)?


Solution

  • Ay,

    As what I know you can't. Your containerized application write logs to stdout and/or stderr. These are then catched by Kubernetes.

    It's the application responsibility to produce logs with info, error, etc... informations and format them to allow them being usable by an external logs tools like StackDriver (it's an example because I'm on GKE from Google).

    So maybe when you launch your containerized application you can configure logs level to output other logs than info ?