DevOps Tools Engineer (LPIC-OT 701) — Question 32
Which of the following mechanisms are used for service discovery in a container environment? (Choose two correct answers.)
Answer options
- A. The container platform offers a command like docker service discover which should be run within a container.
- B. The container platform sets environment variables containing service information within the containers.
- C. The container platform lists localhost ports assigned to containers in each container's /etc/services file.
- D. The container platform mounts the sockets for all available services into the container's file systems.
- E. The container platforms maintains DNS records which point to containers offering a specific service.
Correct answer: B, E
Explanation
Option B is correct because container platforms often set environment variables to make service information available to applications within containers. Option E is also correct, as many container platforms utilize DNS for service discovery, allowing containers to resolve service names to appropriate IP addresses. The other options suggest mechanisms that are not typically used in standard container orchestration environments.