Загрузка...

EP12 - Kubernetes Debugging

🚀 In this episode of DevOps Basics with Dali, we stop building Kubernetes applications and start fixing them.

One of the most valuable skills in Kubernetes is troubleshooting. In real environments, applications crash, images fail to download, services stop routing traffic, and Pods remain stuck in Pending state.

In this hands-on lab, we intentionally break Kubernetes resources and learn how to identify the root cause using the most important debugging commands.

## What You'll Learn

- kubectl get pods
- kubectl describe
- kubectl logs
- kubectl get events
- CrashLoopBackOff
- ImagePullBackOff
- Pending Pods
- Service Selector Mismatch
- Wrong Service Port Configuration
- Real-world Kubernetes troubleshooting

## Debugging Workflow
kubectl get pods
kubectl describe pod
kubectl logs
kubectl get events
Fix and Reapply

## Hands-On Labs
### Lab 1 - CrashLoopBackOff
Container starts and immediately crashes.
Learn:
kubectl get pods
kubectl describe pod
kubectl logs

### Lab 2 - ImagePullBackOff
Kubernetes cannot download the container image.
Learn:
kubectl describe pod

### Lab 3 - Pending Pods
Pod cannot be scheduled because the cluster lacks resources.
Learn:
kubectl describe pod
kubectl get events

### Lab 4 - Service Selector Mismatch
Pods are running but the Service is not connected to them.
Learn:
kubectl get endpoints
kubectl describe svc

### Lab 5 - Wrong Service Port
Everything looks healthy, but traffic is sent to the wrong port.
Learn:
kubectl describe svc
kubectl get endpoints

## Commands Used

### Check Pod Status
kubectl get pods

### Inspect Resources
kubectl describe pod pod-name
kubectl describe svc service-name

### Read Logs
kubectl logs pod-name

### Check Cluster Events
kubectl get events --sort-by=.metadata.creationTimestamp

### Check Endpoints
kubectl get endpoints

### Verify Resources
kubectl get all

## Key Takeaways
- Follow a process
- Don't guess
- Read the evidence Kubernetes provides
- Understand where traffic flows
- Find the root cause before applying a fix

Great Kubernetes engineers know how to debug.

━━━━━━━━━━━━━━━━━━━━━━
📦 Source Code
https://github.com/dalita/devops-basics-with-dali

🎥 Playlist
Kubernetes for Beginners

☕ Subscribe for more DevOps content
━━━━━━━━━━━━━━━━━━━━━━

## Next Episode

EP13 — Real World Application on Kubernetes

Topics:
- Node.js Application
- ConfigMap
- Secret
- Persistent Storage
- Service
- Ingress
- End-to-End Deployment
#kubernetes #k8s #KubernetesDebugging #DevOps #CloudNative #Containers #Docker #PlatformEngineering #SRE #Troubleshooting #CrashLoopBackOff #ImagePullBackOff #kubernetestutorial #learnkubernetes #DevOpsBasicsWithDali

Видео EP12 - Kubernetes Debugging канала Devops Basics with Dali
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять