You want to improve security by restricting your app's access to an external database using the ambassador container pattern. Which approach best achieves this?
hard📝 Workflow Q15 of 15
Docker - Production Patterns
You want to improve security by restricting your app's access to an external database using the ambassador container pattern. Which approach best achieves this?
AAllow the app container to connect directly to the database and use ambassador only for logging.
BConfigure the ambassador container to handle all database connections and apply network policies to block direct app access.
CRun the ambassador container in a separate pod with public IP to filter traffic.
DDisable the ambassador container and let the app connect directly for simplicity.
Step-by-Step Solution
Solution:
Step 1: Use ambassador as controlled proxy
Configure ambassador to manage all database connections, acting as a gatekeeper.
Step 2: Apply network policies
Block direct app access to the database, forcing traffic through ambassador for security.
Final Answer:
Configure the ambassador container to handle all database connections and apply network policies to block direct app access. -> Option B