I have an application deployed in Google Kubernetes Engine. It uses Ingress load balancer and currently there are 2 pods running my application among which API requests are distributed. The application is a Spring Boot application. I can view what API calls made to each pod individually using access logs provided by Spring Boot, but I want to view all the requests at once. I think that's possible because all the requests are first intercepted by load balancer before they get distributed. Is there a way I can do that?
After searching around a bit more I found what I was looking for. To view access logs for application deployed using GKE do the following:
Stackdriver logs
.Here you will find real time logs of API requests to your application.
Since you are getting the API calls from your application pods, it sounds like putting logs from both pods (assuming they are part of the same app) would help:
kubectl logs -l app=<app name> -n <namespace>