View Logs for the Gateway

The gateway maintains a comprehensive set of logs that can help you troubleshoot issues.
gateway10cr2
The following instructions are derived from a third-party sources and are intended to serve as an example only.  Layer7 strongly recommends that users consult the Kubernetes documentation for the latest instructions and best practices on logging.
You may perform basic logging in Kubernetes at the pod level to debug immediate Gateway pod problems and cluster activity. However, when the pod/container crashes or shuts down, the logs will not persist unless a separate log storage and aggregation tool is used via standard output to ensure that cluster-level logging is possible. Kubernetes does not provide native storage solution for log data. You can learn more about log store options in Layer7's Container Gateway reference architecture.
To view logs for a Gateway pod in a Kubernetes cluster:
  1. Identify the pod your Container Gateway is running in:
    $ kubectl get namespaces $ kubectl get pods -n <your namespace> -o wide
    Example:
    $ kubectl get namespaces NAME STATUS AGE default Active 35d kube-node-lease Active 35d kube-public Active 35d kube-system Active 35d $ kubectl get pods -n default -o wide NAME READY STATUS RESTARTS AGE IP NODE gateway-grafana-f9tttcfcc-r4t6x 1/1 Running 0 6d 240.###.###.### gke-perf... gateway-influxdb-0 1/1 Running 0 6d 240.###.###.### gke-perf... gateway-mysql-5559335668-5fkgg 1/1 Running 0 6d 240.###.###.### gke-perf... gateway-ssg-thisistheone-01 1/1 Running 0 6d 240.###.###.### gke-perf...
  2. Retrieve logs from the Gateway pod:
    $ kubectl logs <your pod> > <your file name>
    Example:
    $ kubectl logs gateway-ssg-thisistheone-01 > gateway-ssg-thisistheone-01-202008110834.log
    The console log for the 'gateway-ssg-thisistheone-01' pod is dumped into the
    gateway-ssg-thisistheone-01-202008110834.log
    file.

Debugging SSL/TLS

To enable logs for debugging SSL/TLS:
Set the Gateway environmental variable, EXTRA_JAVA_ARGS, with the system property
javax.net.debug=<options>
with one of the options specified in Java 8 Secure Socket Extension (JSSE) Reference Guide > Debugging Utilities.
Example values for the option include
javax.net.debug=all
OR
javax.net.debug=ssl:handshake:verbose
Do NOT use the option
help.
It may cause some providers to terminate the JVM.