Skip to main content

Execute a pod with a shell to debug

Introduction

To test network configuration, naming resolution and opened flow, it's very useful to run a pod an instance.

HOWTO

Run an ubuntu pod

kubectl run ubuntu-pod --image=ubuntu:20.04 --restart=Never -- sleep infinity

Execute a shell command

kubectl exec -it ubuntu-pod -- /bin/bash