Edit a File in a Running Kubernetes Pod: a Non-Root Container Case
Learn how to edit a file in a running Kubernetes Pod when the container's user has no write access to it.
Focused, hands-on DevOps and server-side problems with hints, feedback, and automated solution checks.
Learn how to edit a file in a running Kubernetes Pod when the container's user has no write access to it.
Learn how to edit a file in a distroless container that runs as a non-root user in a Kubernetes namespace that enforces the baseline Pod Security Standard.
Learn how to access a service bound to localhost of the Docker host from a bridge-networked container, without exposing the service to the local network or disabling network isolation.
Learn how to access services running on the Docker host from a bridge-networked container, without hardcoding host IP addresses or disabling network isolation.
Play a security researcher: identify the hosts a black-box container keeps making encrypted HTTPS calls to, route them through a MITM proxy, fake the certificate, and see what the container sends over the network.
Sometimes you need an app to talk to a different backend, but its configuration is unknown or the destination address is hard-coded. Practice overriding hostname resolution for a single Docker container to redirect its requests without modifying the app or rebuilding its image.
A distroless container serves a debug interface on its own loopback address. Can you reach this debug endpoint using nothing but standard Docker commands?
You are containerizing the dev workflows of a legacy Python service and you need to find out which external services its test suite talks to. Can you think of an easy way to do it?
Ad-hoc containers are a handy way to run command-line tools without installing them on the host. Use one to access a production Redis server and turn off a feature flag. But beware of the gotcha: the production server can only be tunneled to the localhost.
Explore the container networks of a freshly installed Docker host: find the default network, its subnet and gateway, and the Linux interface behind it.