Easy, Β onΒ  Containers,Β Kubernetes Submissions: 41/63

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 /root/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 /root/nginx-bin.

Good luck!

Hint 1 πŸ’‘

It's an easy task - kubectl cp --help will help you out πŸ˜‰

Categories:Β Containers,Β Kubernetes
Discussion:Β  Discord

Level up your server-side game β€” Join 6,600 engineers who receive insightful learning materials straight to their inbox