Settings

Theme

Kubernetes Ephemeral Containers and `kubectl debug` Command

iximiuz.com

5 points by rajeevk 4 years ago · 1 comment

Reader

hhthrowaway1230 4 years ago

A thing that really would help in terms of debugging, is re-running a spec, with a changed command in a clean way.

Sometimes jobs fail and terminate too fast to shell in it and to see if anything is really properly configured. (mounts/secrets/etc) So usually I copy the pod spec, change the command to "sleep" and remove all the cruft that k8s doesn't allow when applying the yaml. And then run again, and then when it's "sleep"ing I can shell into it and run the commands, check the secrets and what not.

Most of the work of this approach goes into changing the command, and cleaning up the spec.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection