I have to monitor Java container in GKE using stackdriver. Since stackdriver agent can't be installed in GKE nodes[COS image]. What is the way to monitor JVM??
At first, have a look at the Stackdriver Logging agent documentation:
Google Kubernetes Engine (GKE) includes managed support for Stackdriver Monitoring and Stackdriver Logging.
more details you can find here.
In addition to JVM Monitoring plugin that mentioned @Kolban, you can try to achieve your goal with JMX extporter and/or Kube eagle exporters to Prometheus and Grafana.