If you use GKE and Cloud Logging for log monitoring, you need to print logs as JSON format to use more effective monitoring on Cloud Console. However if you use kubectl logs to see logs on CLI, logs won’t be seen readable. It prints each line as a JSON object.

For most cases it is best to use Google Cloud Console to filter logs and display details but sometimes you want to see logs quickly on CLI.

To see JSON based logs as a text format, I wrote a simple shell script. Basically this script uses jq to convert JSON object to text. You can access the script and installation details on Github: https://github.com/berker/kube-gke-logs