To retrieve all logs, run the following command:
microk8s kubectl logs -l tier=elma365 --all-containers > logs.txt
To view the logs of a specific service, run the following command:
microk8s kubectl logs -l app=[name]
where [name] is the name of the service.
Example:
microk8s kubectl logs -l app= main
To view log files in real time, run the command above with the -f option.
Example:
microk8s kubectl logs -l app=main –f
To display only the last part of a large log file, add the - - tail option to the command above.
Was this helpful?
Found a typo? Highlight the text, press ctrl + enter and notify us