Last active
March 26, 2021 09:07
-
-
Save ocristian/379d1567a3ae7551cef31afb9d3fb19c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Contexts | |
| kcgc - kubectl config get-contexts | |
| kcuc - kubectl config use-context [CONTEXT name] | |
| # POD | |
| # list pods | |
| kgp | grep [POD] | |
| # execute a command in a container | |
| k exec [POD] -it -- bash | |
| # restart pod | |
| kubectl rollout restart "deployment/[POD]" | |
| # delete | |
| kubectl delete pod [POD] | |
| # Port-forward | |
| k port-forward [POD] local-port:remote-port | |
| # Logs | |
| kubetail [POD] | |
| # Scaling | |
| kubectl get hpa [POD] | |
| kubectl describe hpa [POD] | |
| kubectl edit hpa [POD] | |
| kubectl scale deployment [POD] --replicas=0 | |
| # Deployment | |
| kubectl describe deployment [POD] | |
| kubectl get deployment [POD] | |
| kubectl delete all,ingress -l "key=value" | |
| kubectl describe ingress [resource] | |
| # Cron Jobs | |
| kubectl get cronjob [name] | |
| kubectl delete cronjob [name] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment