There is an Nginx Pod named web running in the default
namespace.
Whoever started it forgot to add the required nginx.conf
file to its container.
Your task is to copy the config file to the Pod without restarting it.
After that, you will need to copy the nginx
binary from the Pod to the host for further analysis by the security team.
- You can access the Nginx server at Pod's IP address on port 80.
- The correct config file is located on the host at
~/nginx.conf
. - The config file in the
web
container is located at/etc/nginx/nginx.conf
. - Use
kubectl exec web -c web -- nginx -s reload
to trigger a config reload. - The Nginx binary is located in the
web
container at/usr/sbin/nginx
. - Copy the Nginx binary to the host at
~/nginx-bin
.
Good luck!
Hint 1 ๐ก
It's an easy task - kubectl cp --help
will help you out ๐
Level up your Server Side game โ Join 8,400 engineers who receive insightful learning materials straight to their inbox