Kubernetes: one-off env exec

· Thiago Perrotta · March 23, 2026, 11:32 a.m.
Summary
This blog post discusses how to properly run a one-off script or binary in a Kubernetes pod while ensuring sensitive environment variables, like VAULT_TOKEN, are correctly set without exposing them in plain text. It includes tips for using the 'kubectl exec' command effectively and emphasizes the importance of not recording sensitive commands in shell history.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →