_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

kubectl Cheat Sheet

28. 06. 2023 1 min read intermediate

Cloud Beginner

kubectl Cheat Sheet

kubectlKubernetesCLI 3 min read

Nejpoužívanější kubectl příkazy pro každodenní práci s Kubernetes.

Basic Commands

# Informace
kubectl get pods/svc/deploy/ingress -n namespace
kubectl get all
kubectl describe pod 
kubectl top pods  # Resource usage

# CRUD
kubectl apply -f manifest.yaml
kubectl delete -f manifest.yaml
kubectl create deployment myapp --image=myapp:v1

# Scaling
kubectl scale deploy myapp --replicas=5

# Rollout
kubectl rollout status deploy myapp
kubectl rollout undo deploy myapp
kubectl rollout history deploy myapp

Advanced

# JSONPath
kubectl get pods -o jsonpath='{.items[*].status.phase}'

# Label selektory
kubectl get pods -l app=myapp,env=prod

# Kontext
kubectl config get-contexts
kubectl config use-context production

# Dry run + diff
kubectl apply -f new.yaml --dry-run=server
kubectl diff -f new.yaml

Summary

kubectl je váš Swiss Army knife pro K8s. Nastavte si aliasy: alias k=kubectl

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.