I condensed below a cheat sheet of Kubernetes useful commands. I will keep updating this list as I come across other operations.
kubectl get pods
kubectl get pods -n other_namespace
kubectl describe pod my-pod
kubectl exec -it my-pod sh
kubectl port-forward my-pod 1234:1234
kubectl logs -f my-pod
kubectl delete pod my-pod
kubectl delete pod my-pod --grace-period=0 --force
kubectl delete pod --field-selector=status.phase==Succeeded
kubectl apply -f path/to/deployment.yml
kubectl config current-context
kubectl config use-context other_context
kubectl config set-context --current --namespace=my-namespace
kubectl get node --show-labels
kubectl get service myservice -o yaml
kubectl get secrets myservice -o yaml
kubectl create job --from=cronjob/my-cron my-cron-quick-run
chmod +x ./kubectl<br>sudo mv ./kubectl /usr/local/bin/kubectl
This guide will show you how to create a Python function decorator with a few…
This guide will show you how to fix the error Got permission denied while trying…
This guide will show you how to create a Python virtual environment on Intellij IDEA…
This tutorial will quickly show you how to to find and kill processes on Linux,…
This guide shows a possible solution for Python error Relocation R_X86_64_PC32 against symbol can not…
This tutorial will show how to create aliases for commands on Unix based systems, so…