Common commands
kubectl config get-contexts -n=my-namespace
It is useful to restart pods. (Short downtime is possible)
kubectl scale deployments/my-deployments-name --replicas=number-of-replicas -n=my-namespace
It is useful to restart pods. (No downtime)
kubectl rollout restart deployment/my-deployments-name -n=my-namespace
kubectl get pods -n=my-namespace
Useful to get shell for the pod. (In this case my-command is bash)
kubectl exec -it -n=my-namespace my-pod-name my-command
kubectl get jobs -n=my-namespace
The unique-job-name will be visible on the web UI, you can delete it from here. An alternative solution is to run the job from web UI.
kubectl create job unique-job-name --from=cronjob/my-cron-job-name
kubectl logs -n=my-namespace -l app=myapp-web
kubectl logs -n=my-namespace -l applicationName=myapp