1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
kubectl get nodes kubectl get namespaces kubectl get pods kubectl get pods -A kubectl get pods --all-namespaces kubectl get pods -o wide kubectl get pods -A -o wide kubectl get services kubectl get pod my-pod -o yaml kubectl get all kubectl get all --all-namespaces
kubectl describe nodes my-node kubectl describe pods my-pod
kubectl exec <pod-name> -- ls / kubectl exec --stdin --tty my-pod -- /bin/sh kubectl exec <pod-name> -c my-ctn -- ls /
kubectl logs deploy/my-dep kubectl logs deploy/my-dep -c my-ctn
kubectl apply -f my.yaml kubectl apply -f ./my1.yaml -f ./my2.yaml kubectl apply -f ./dir kubectl apply -f https://git.io/demo.yaml
kubectl delete -f my.yaml kubectl delete pod,service baz foo kubectl delete pods,services -l name=myLabel kubectl -n my-ns delete pod,svc --all
|