Configuring logging for a Kubernetes deployment
Logs must be collected for both running and terminated containers and processes. Logging collection is required for IBM Support to assist with troubleshooting. For container-based deployments (Kubernetes), specific log commands and mechanisms vary depending on a customer's environment.
About this task
For container-based deployments that use Kubernetes, collect logs by using a method suitable for
your environment. You can run the following
command:
kubectl logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER]
for each pod
in the Kubernetes cluster. For more information about Kubectl documentation, see https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#logsHowever, the logs that are generated by the kubectl logs
command do not include
terminated pods and processes. Use ELK, or another logging infrastructure, to gather logs that
include terminated pods and processes. For more information, see https://www.elastic.co/elk-stack.
Specific log commands and mechanisms vary depending on a customer's environment. Log collection must be enabled for all running and terminated containers.