Zum Inhalt springen
_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
Referenzen Technologien Blog Know-how Tools
Über uns Zusammenarbeit Karriere
CS EN DE
Lassen Sie uns sprechen

kubectl Cheat Sheet

28. 06. 2023 1 Min. Lesezeit intermediate

Cloud Začátečník

kubectl Cheat Sheet

kubectlKubernetesCLI 3 min čtení

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

Základní příkazy

# 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

Pokročilé

# 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

Shrnutí

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

Potřebujete pomoct s implementací?

Náš tým má zkušenosti s návrhem a implementací moderních architektur. Rádi vám pomůžeme.

Nezávazná konzultace

Teilen:

CORE SYSTEMS tým

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