Bookmark this page

Quiz: Container Networking Basics

Container Networking Basics

You are tasked with designing the Podman network layout for an application that uses the following set of containers.

The web UI container for the application is called app-ui. This container uses the app-ui:v2.1.1 image tag and the app-api network.

The API container for the application is called app-api. This container uses the app-api:v2.3.4 image tag, and the app-api and app-db networks.

The PostgreSQL database server container is called app-db. This container uses the postgresql:11 image tag and the app-db network.

Each container must communicate with at least one other container via Podman networks. Isolate network communication so that only necessary connections are available. The containers use DNS hostnames to connect to one another.

Given the preceding scenario, choose the correct answers to the following questions:


  1. 1.

    How many Podman networks are necessary to meet the requirements?

    A

    0

    B

    1

    C

    2

    D

    3

    E

    4

    F

    5

  2. 2.

    Which of the following commands creates a new Podman network called app-ui?

    A

    podman network app-ui

    B

    podman network create app-ui

    C

    podman create app-ui

    D

    podman create-network app-ui

  3. 3.

    Which of the following commands prints metadata about the network called app-api?

    A

    podman inspect network app-api

    B

    podman network inspect app-api

    C

    podman inspect app-api

    D

    podman network metadata app-api

  4. 4.

    Which of the following commands creates the app-db container attached to the appropriate networks?

    A

    podman run -d --name app-db app-db postgresql

    B

    podman run -d --name app-db --net app-api,app-ui postgresql:11

    C

    podman run -d --name app-db --connect app-db postgresql:11

    D

    podman run -d --name app-db --net app-db postgresql:11

  5. 5.

    Which of the following commands creates the app-api container attached to the appropriate networks?

    A

    podman run -d --name app-api -p 8080:8080 app-api:v2.3.4

    B

    podman run -d --name app-api --net app-api app-api:v2.3.4

    C

    podman run -d --name app-api --net app-api,app-db app-api:v2.3.4

    D

    podman run -d --name app-api --net app-ui,app-api,app-db app-api:v2.3.4

  6. 6.

    Could the default podman network replace one of the networks in this configuration? Why or why not?

    A

    Yes, because the default podman network provides DNS by default.

    B

    Yes, but the podman network needs to be overwritten to enable DNS.

    C

    No, because normal users cannot connect containers to the default podman network.

    D

    No, because the default podman network cannot provide DNS.

Revision: do188-4.14-8c43a16