Kubernetes Cheatsheet

Kubernetes commands and concepts for container orchestration and deployment

DevOps6 commandsadvanced

Overview

Kubernetes is an open-source container orchestration platform for automating application deployment.

Why It Matters

Kubernetes automates deployment, scaling, and management of containerized applications.

Essential Commands

kubectl get pods -A

List pods in all namespaces

kubectl apply -f deployment.yaml

Create or update resources from manifest

kubectl describe pod <pod-name>

Show detailed pod diagnostics

kubectl logs -f <pod-name>

Stream logs from a pod

kubectl rollout status deployment/<name>

Check deployment rollout progress

kubectl port-forward svc/<name> 8080:80

Forward local port to service

Quick Start

Master understand pods, services, and deployments first

Key Concepts

Understand pods, services, and deployments

Master ConfigMaps and Secrets

Learn rolling updates and scaling

Pro Tips

  • Combine multiple commands for powerful workflows
  • Use aliases to speed up your command entry
  • Create scripts to automate repetitive tasks

Common Pitfalls to Avoid

  • Forgetting to check the documentation for edge cases
  • Running commands without understanding their full impact
  • Not testing changes in a safe environment first

Related Resources

12 items