CKA Quick Check Points — Logs & Configs

Quick recap for logs & configs. Details can click the title link or check the official doc.

1. Log

1.1 Files

/var/log/

Pod: /var/log/pods/<namespace>/<pod-name>/<container-name>.log

Etcd: /var/log/etc…


This content originally appeared on DEV Community and was authored by Cheedge Lee

Quick recap for logs & configs. Details can click the title link or check the official doc.

1. Log

1.1 Files

  • /var/log/
    • Pod: /var/log/pods/<namespace>/<pod-name>/<container-name>.log
    • Etcd: /var/log/etcd.log
    • kubelet: /var/log/syslog

1.2 CMD

# 1. components log
grep kubelet /var/log/syslog
journalctl -u [kubectl|kube-controller-manager|kube-scheduler|kube-apiserver|etcd|docker|containerd]
kubectl logs <pod-name> -n kube-system
# 2. Pod log
kubectl describe pod <pod-name> -n kube-system
kubectl logs <pod-name> -c <container-name>
# use crictl or docker (in case when docker is used) to check the logs and process
# crictl ps/logs

1.3 sidecar

sidecar container used for logging

official doc

2. Config

2.1 Files

  • /etc/kubernetes/: most k8s configuration files.
    • /etc/kubernetes/manifest: static pod config files
  • /var/lib/kubelet/: kubelet related data and configuration.
  • /var/lib/etcd/: etcd data.
  • /etc/systemd/system/: systemd service configuration files.

2.2 CMD

# View the active kubeconfig settings.
kubectl config view
# check the corresponding pods
kubectl describe pod <pod-name> -n kube-system
# use systemctl cat
systemctl cat [kubectl|kube-controller-manager|kube-scheduler|kube-apiserver|etcd|docker|containerd]
# can even use find
find / | grep kubeadm

3. Context

kubectl config current-context

4. Jobs

kubectl delete jobs --all
kubectl get pods -w


This content originally appeared on DEV Community and was authored by Cheedge Lee


Print Share Comment Cite Upload Translate Updates
APA

Cheedge Lee | Sciencx (2025-01-09T22:54:17+00:00) CKA Quick Check Points — Logs & Configs. Retrieved from https://www.scien.cx/2025/01/09/cka-quick-check-points-logs-configs/

MLA
" » CKA Quick Check Points — Logs & Configs." Cheedge Lee | Sciencx - Thursday January 9, 2025, https://www.scien.cx/2025/01/09/cka-quick-check-points-logs-configs/
HARVARD
Cheedge Lee | Sciencx Thursday January 9, 2025 » CKA Quick Check Points — Logs & Configs., viewed ,<https://www.scien.cx/2025/01/09/cka-quick-check-points-logs-configs/>
VANCOUVER
Cheedge Lee | Sciencx - » CKA Quick Check Points — Logs & Configs. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/09/cka-quick-check-points-logs-configs/
CHICAGO
" » CKA Quick Check Points — Logs & Configs." Cheedge Lee | Sciencx - Accessed . https://www.scien.cx/2025/01/09/cka-quick-check-points-logs-configs/
IEEE
" » CKA Quick Check Points — Logs & Configs." Cheedge Lee | Sciencx [Online]. Available: https://www.scien.cx/2025/01/09/cka-quick-check-points-logs-configs/. [Accessed: ]
rf:citation
» CKA Quick Check Points — Logs & Configs | Cheedge Lee | Sciencx | https://www.scien.cx/2025/01/09/cka-quick-check-points-logs-configs/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.