Kubernetes Commands
Debugging
https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-output-verbosity-and-debugging
--v=9is good for seeing values, put into JSON formatter
Get logs for pod
$ kubectl logs <pod_name>Get logs for ingress controller
$ kubectl logs -n kube-system $(kubectl get po -n kube-system | egrep -o 'alb-ingress[a-zA-Z0-9-]+')Spinning up the instances
$ kubectl run --replicas=1000 web-server # deploys an application on the cluster 1000 timesScaling the instances
$ kubectl run --replicas=1000 web-server
$ kubectl scale --replaces=2000 web-server # scales up the current webserver to 2000 instancesUpdating the instances
Rollback
View Information on the Cluster
See nodes in cluster
List pods
Describe pods (Troubleshooting)
Exec into bash
Delete pods by pattern
Last updated
Was this helpful?