A cheat sheet to stop doing
history | grep
kubectl get namespacekubectl config set-context --namespace=[namespace name]kubectl create namespace [namespace name]kubectl exec -it [pod name] -- [path]ex)
k exec -it prism-69b8c846c-gc9zj -- /bin/shkubectlcommand is aliased tok- Note that some cases use
/bin/bashinstead of/bin/sh
k exec -it [pod name] -c [container name] -- [path]kubectl delete pod [pod name]kubectl delete pod [pod name] -grace-period=0 --force- Setting the
-grace-periodoption to 0 deletes the pod immediately - The
--forceoption enables forced deletion
kubectl delete all --selector app=[APP_IDENTIFIER]kubectl delete serviceaccount [service account name]kubectl delete deploymnet [deployment name]kubectl logs -f [pod name]If multiple containers are running in a single pod, use the -c option to specify the container
kubectl logs -f [pod name] -c [container name]kubectl get eventskubectl get events --sort-by=.meta.creationTimestampkubectl get serviceskubectl get pods --all-namespaceskubectl get pods -o widekubeclt