Kubernetes K8s/Monitoring

# k8s cluster auto scaler

kubectl -n kube-system describe configmap cluster-autoscaler-status
kubectl -n kube-system get      configmap cluster-autoscaler-status -o yaml

Add a sniffer as a sidecart to a pod

Capture console log lines on termination

terminationMessagePolicy: FallbackToLogsOnError

https://kubernetes.io/docs/tasks/debug-application-cluster/determine-reason-pod-failure/#writing-and-reading-a-termination-message

Moreover, users can set the terminationMessagePolicy field of a Container for further customization. This field defaults to “File” which means the termination messages are retrieved only from the termination message file. By setting the terminationMessagePolicy to “FallbackToLogsOnError”, you can tell Kubernetes to use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller.


CategoryK8sKubernetes

k8s/Monitoring (last edited 2022-10-21 00:19:58 by PieterSmit)