Logo

dev-resources.site

for different kinds of informations.

CKA Quick Check Points -- Logs & Configs

Published at
1/9/2025
Categories
cka
kubernetes
log
config
Author
cheedge_lee
Categories
4 categories in total
cka
open
kubernetes
open
log
open
config
open
Author
11 person written this
cheedge_lee
open
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/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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

3. Context

kubectl config current-context
Enter fullscreen mode Exit fullscreen mode

4. Jobs

kubectl delete jobs --all
kubectl get pods -w
Enter fullscreen mode Exit fullscreen mode
cka Article's
30 articles in total
Favicon
Turning Markdown into Learning: publishing a challenge on labs.iximiuz.com
Favicon
CKA Quick Check Points -- RBAC
Favicon
CKA Quick Check Points -- Network
Favicon
CKA Quick Check Points -- Logs & Configs
Favicon
CKA Recap -- Deployment
Favicon
ClusterIP vs. NodePort
Favicon
CKA Recap -- Ingress & NetworkPolicy
Favicon
Kubernets Storage Demos
Favicon
3. CKA Storage
Favicon
Why must a Kubernetes cluster have an odd number of nodes
Favicon
Understanding Pod Topology Spread Constraints in Kubernetes
Favicon
Deployments and Replica Sets in Kubernetes
Favicon
40 days of Kubernetes: Docker Fundamentals
Favicon
Understanding Kubernetes Pods and YAML Fundamentals
Favicon
Creating a Kubernetes Cluster with Kubeadm and Containerd: A Comprehensive Step-by-Step Guide
Favicon
Mastering Multi-Stage Builds in Docker 🚀
Favicon
Mastering Docker Fundamentals: The First Step in Becoming a Certified Kubernetes Administrator
Favicon
How I Passed the Certified Kubernetes Administrator (CKA) Exam and How You Can Too
Favicon
AWS EKS Ingress - Canary
Favicon
Certified Kubernetes Administrator (CKA) Prep.
Favicon
Certified Kubernetes Administrator (CKA) - Several Successful Story
Favicon
YouTube 13k Subscriber crossed! Exciting Giveaway
Favicon
How to Pass the Certified Kubernetes Administrator Examination
Favicon
'Kubernetes Complete Course In 10 Hours' – your ultimate beginner's guide to Kubernetes FREE!
Favicon
Kubernetes CKA Exam Question Bank .. 17 Questions with Complete Lab .. In 3 hours .. FREE!
Favicon
ROAD TO CKA [Certified Kubernetes Administrator ]-Core Concept- Pod(Day-7)
Favicon
ROAD TO CKA [Certified Kubernetes Administrator ]-Kubernetes Architecture(Day-4)
Favicon
Installing Kubernetes-1.27.0 in Ubuntu 22.04
Favicon
ROAD TO CKA [Certified Kubernetes Administrator ]-What Kubernetes is & is not?(Day-3)
Favicon
ROAD TO CKA [Certified Kubernetes Administrator ]-Core Concept- Control Plane/Master Node (Day-5)

Featured ones: