![]() ![]() Since we have access to a the network namespace of the Pod, we should be able to send a GET request using curl/wget utilities, which would not be available on a distroless image - / # wget localhost:80Ĭonnecting to localhost:80 (127.0.0.1:80) If you dont see a command prompt, try pressing enter. Py-serv-deployment-686578cbfb-lb9g7 1/1 Running 0 5sĪttach an ephemeral container to the pod - :~/mirrord$ kubectl debug -it py-serv-deployment-686578cbfb-lb9g7 -image busyboxĭefaulting debug container name to debugger-hthnc. Nginx-deployment-66b6c48dd5-gmfc7 1/1 Running 0 7m7s List the deployments - :~/mirrord$ kubectl get pods ![]() Image: ghcr.io/metalbear-co/mirrord-pytest:latest I will create a new deployment using this file - app.yaml apiVersion: apps/v1 Let’s look at a few examples of how one might go about debugging with ephemeral containers. :~/mirrord$ kubectl exec -it py-serv-deployment-686578cbfb-9hfpw - sh This comes in handy when debugging/troubleshooting distroless images or images that lack certain utilities, where kubectl exec won’t be helpful. What are Ephemeral Containers? #Įphemeral containers let us run a container with a specific image in the context of an already running container in a Pod. Not sure? Fear not! In this blog post we will try to shed some light on this new feature soon to be stable 1 in Kubernetes v1.25. If you’re following the latest news on Kubernetes, you probably would have heard about Ephemeral Containers. ![]()
0 Comments
Leave a Reply. |