Debugging K8s NGINX Issues

Last edited 19th September 2020

Frustrations Kubernetes

First, scale down the number of pods:

k autoscale deployment <deploymentName> --min=1 --max=1

Then, exec into a pod:

k exec --stdin --tty <podName> -- /bin/bash

If the pod has more than one container:

kubectl exec --stdin -tty <podName> --container <containerName> -- /bin/bash

Install vim w/ apt update && apt install vim, and then edit /etc/nginx/conf.d/default.conf.

Finally, reload with nginx -s reload.