diff --git a/knowledge base/kubernetes/README.md b/knowledge base/kubernetes/README.md index 9c95155..26d90bc 100644 --- a/knowledge base/kubernetes/README.md +++ b/knowledge base/kubernetes/README.md @@ -243,6 +243,7 @@ Also see [configuration best practices] and the [production best practices check Leverage [Namespaces]. - Consider **organizing** cluster and workload resources.
Leverage [Labels][labels and selectors]; see [recommended Labels]. +- Consider forwarding logs to a central log management system for better storage and easier access. - Avoid sending traffic to pods which are not ready to manage it.
[Readiness probes][Configure Liveness, Readiness and Startup Probes] signal services to not forward requests until the probe verifies its own pod is up.
@@ -254,7 +255,7 @@ Also see [configuration best practices] and the [production best practices check - Prefer smaller container images. - Prioritize critical workloads.
Leverage [quality of service](#quality-of-service). -- Instrument applications to detect and respond to the SIGTERM signal. +- Instrument workloads to detect and respond to the `SIGTERM` signal to allow them to safely and cleanly shutdown. - Avoid using bare pods.
Prefer defining them as part of a replica-based resource, like Deployments, StatefulSets, ReplicaSets or DaemonSets. - Leverage [autoscalers](#autoscaling). diff --git a/knowledge base/kubernetes/kubectl.md b/knowledge base/kubernetes/kubectl.md index e670063..fb83d25 100644 --- a/knowledge base/kubernetes/kubectl.md +++ b/knowledge base/kubernetes/kubectl.md @@ -363,6 +363,7 @@ kubectl logs -f -l 'name=myLabel' --all-containers # Get Logs for a previous instantiation of a Container. kubectl logs 'nginx' --previous +kubectl logs 'nginx' -p -c 'init' # Get the Logs of the first Pod matching 'ID'. kubectl logs $(kubectl get pods --no-headers | grep $ID | awk '{print $2}')