TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Kubernetes Ephemeral Containers and `kubectl debug` Command

5 pointsby rajeevkalmost 3 years ago

1 comment

hhthrowaway1230almost 3 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.<p>Sometimes jobs fail and terminate too fast to shell in it and to see if anything is really properly configured. (mounts&#x2F;secrets&#x2F;etc) So usually I copy the pod spec, change the command to &quot;sleep&quot; and remove all the cruft that k8s doesn&#x27;t allow when applying the yaml. And then run again, and then when it&#x27;s &quot;sleep&quot;ing I can shell into it and run the commands, check the secrets and what not.<p>Most of the work of this approach goes into changing the command, and cleaning up the spec.