Kubernetes CLI.
kubectl [BEFEHL] [OPTIONEN]
kubectl version
K8s command line tool.
Ressourcen anzeigen.
kubectl get [RESSOURCE] [OPTIONEN]
kubectl get pods
kubectl get services -o wide
Get resources.
Konfiguration anwenden.
kubectl apply [OPTIONEN] -f DATEI
kubectl apply -f deployment.yaml
Apply configuration.
Ressourcen löschen.
kubectl delete [RESSOURCE] NAME [OPTIONEN]
kubectl delete pod mypod
kubectl delete -f deployment.yaml
Delete resources.
Pod-Logs anzeigen.
kubectl logs [OPTIONEN] POD
kubectl logs mypod
kubectl logs -f mypod
Show logs.
Befehl in Pod ausführen.
kubectl exec [OPTIONEN] POD -- BEFEHL
kubectl exec -it mypod -- bash
Execute in pod.
Detaillierte Ressourcen-Info.
kubectl describe [RESSOURCE] NAME [OPTIONEN]
kubectl describe pod mypod
Describe resources.
Ressourcen erstellen.
kubectl create [RESSOURCE] NAME [OPTIONEN]
kubectl create namespace myns
Create resources.
Pod oder Deployment starten.
kubectl run NAME --image=IMAGE [OPTIONEN]
kubectl run nginx --image=nginx
Run pod/deployment.
Service erstellen.
kubectl expose [RESSOURCE] NAME [OPTIONEN]
kubectl expose deployment nginx --port=80
Expose service.