Pinned Tweet
🚀NEW SERIES: 100 Essential DevOps Commands in 10 Days!
Knowing DevOps tools is one thing.
Knowing how to use them is another.
Over the next 10 days, we'll explore practical commands used in real DevOps workflows.
Day 1: Linux Files & Directories
Day 2: Linux System & Processes
Day 3: Logs & Troubleshooting
Day 4: Networking
Day 5: Git & GitHub
Day 6: Bash & Shell Scripting
Day 7: Docker
Day 8: Kubernetes
Day 9: Terraform & AWS CLI
Day 10: Production Troubleshooting
No unnecessary theory.
Just commands, practical examples & real-world usage.
Follow along and build your DevOps skills one day at a time.
Let's start!🔥
#DevOps #Linux #CloudComputing
🐧 100 Essential DevOps Commands in 10 Days
Day 8/10: Kubernetes Commands
Pod stuck in Pending?
Container restarting repeatedly?
Deployment failing after release?
10 kubectl commands to investigate real-world Kubernetes issues. 🧵👇
#DevOps #Kubernetes #CloudComputing
📌Part 3: Logs & Container Access
kubectl logs POD_NAME --tail=50
kubectl logs POD_NAME --previous
kubectl exec -it POD_NAME -- sh
logs --tail=50 → inspect recent application logs
logs --previous → check logs from the previous crashed container
exec→ open a shell inside a running container
💡Previous logs are useful when a container restarts repeatedly.
📌Part 4: Deployment Troubleshooting
kubectl rollout status deployment/APP_NAME
kubectl rollout history deployment/APP_NAME
kubectl rollout undo deployment/APP_NAME
rollout status → check deployment progress
rollout history → inspect previous revisions
rollout undo → roll back to the previous revision
⚠️Don't roll back blindly. Verify the failure and communicate with your team first.
✅Day 8 complete!
Tomorrow, Day 9: Terraform & AWS CLI
init | plan | apply | state
#DevOps #Kubernetes #AWS #CloudComputing
🐳100 Essential DevOps Commands in 10 Days
Day 7/10: Docker Commands
Container not starting?
Application logs showing errors?
Container consuming too much memory?
10 Docker commands to troubleshoot real-world container issues. 🧵👇
#DevOps #Docker #Containers
📌Part 3: Run & Check Logs
docker run -d --name web -p 8080:80 nginx
docker logs --tail 50 web
docker run→ start a container in detached mode and map host port 8080 to container port 80
docker logs→ inspect the last 50 log lines
💡If the application is not responding, check container status, port mapping and logs.
📌Part 4: Inspect & Troubleshoot
docker exec -it web sh
docker inspect web
docker stats
docker stop web
docker exec→ open a shell inside a running container
docker inspect→ view detailed container configuration
docker stats→ monitor live CPU and memory usage
docker stop→ gracefully stop a container
⚠️Don't jump to restarting containers. Check logs and resource usage first.
✅Day 7 complete!
Tomorrow, Day 8: Kubernetes Commands
get | describe | logs | exec
#DevOps #Docker #Kubernetes #CloudComputing
📌Part 3: Conditions & Loops
if [ -f app.log ]; then echo "Log exists"; fi
for env in dev qa prod; do echo "$env"; done
case "$env" in
dev) echo "Development" ;;
prod) echo "Production" ;;
esac
if→ make decisions
for→ repeat tasks
case→ handle multiple conditions
💡Automate repetitive checks, but test scripts before using them in production.
📌Part 4: Debug & Validate
bash -n script.sh
bash -x script.sh
echo $?
bash -n→ check syntax without executing
bash -x→ trace commands during execution
echo $?→ inspect the previous command's exit status
⚠️ Exit code 0 usually means success; non-zero indicates an issue.
✅Day 6 complete!
Tomorrow, Day 7: Docker Commands
images | ps | logs | exec
#DevOps #Bash #ShellScripting #CloudComputing
📌Part 3: Commit & Branch Management
git commit -m "Fix application configuration"
git switch -c feature/api-update
git commit → save staged changes
git switch -c → create and switch to a new branch
💡 Use feature branches to isolate changes before merging them into the main branch.
📌Part 4: Remote & Merge
git fetch origin
git pull --rebase origin main
git fetch→ download remote updates without merging
git pull --rebase→ update your branch by replaying local commits on top of remote changes
⚠️If a merge conflict occurs, resolve the conflicting files, test your changes and continue carefully.
✅ Day 5 complete!
Tomorrow, Day 6: Bash & Shell Scripting
variables | loops | conditions | exit codes
#DevOps #Git #GitHub #CloudComputing
