kubectl -n NAMESPACE get pod -l app.kubernetes.io/name=gentics-cms -o name
kubectl -n NAMESPACE exec -ti PODNAME -- less /Node/tomcat/logs/gentics.log
In Kubernetes, applications usually log to STDOUT, which is captured and managed by Kubernetes.
To access the log, use the kubectl -n NAMESPACE logs PODNAME
command.
Useful options include --tail
(specify the number of lines), --since
and --follow
.
Instead of specifying the PODNAME, you can also use a selector:
-l app.kubernetes.io/name=gentics-cms
for Gentics CMS
-l app.kubernetes.io/name=gentics-mesh
for Gentics Mesh
-l app.kubernetes.io/name=gentics-portal-php
for Gentics Portal | php
-l app.kubernetes.io/name=gentics-portal-java
for Gentics Portal | java
-l app.kubernetes.io/name=gentics-activiti
for Gentics Task Management App
-l app.kubernetes.io/name=keycloak
for Keycloak
-l app=mariadb
for MariaDB
-l chart=elasticsearch
for Elasticsearch
Gentics CMS uses different logfiles for specific tasks, as is detailed in the Gentics CMS guide.
E.g., to read the file /Node/tomcat/logs/gentics.log, first get the name of the POD, then access the file:
kubectl -n NAMESPACE get pod -l app.kubernetes.io/name=gentics-cms -o name
kubectl -n NAMESPACE exec -ti PODNAME -- less /Node/tomcat/logs/gentics.log