Timedora
Free Online Flashcard Deck

Docker Compose and Kubernetes Networking Free Online Flashcards

Study Docker Compose and Kubernetes Networking with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

In a Compose mapping of "8080:8000", which is the host port and which is the container port?

Back

The host port is 8080, and the container port is 8000. A host client can use localhost:8080; another service on the same Compose network uses the destination service’s container port.

02
Front

After a web app receives a request, how can it reach a database backend?

Back

The web application resolves the database’s service name, connects to the database’s container or Service port, and the network directs the request to an available backend.

03
Front

Why use a Kubernetes Service name instead of a Pod’s IP address?

Back

It resolves Service names to stable endpoints, so clients need not track individual Pod IP addresses that can change when Pods are replaced or scaled.

04
Front

When can containers on different networks communicate?

Back

They can communicate directly when they share a network. Communication between different networks depends on routing that connects them.

05
Front

How does a container port differ from a published port?

Back

A container port is where an application listens inside the container or Pod. A published port provides an access path through the host or another external entry point.

06
Front

How can containers in the same Kubernetes Pod communicate?

Back

Containers in the same Pod share a network namespace and can communicate through localhost.

07
Front

On a shared Compose network, how can an app reach a database listening on port 5432?

Back

Use db:5432: Compose’s internal DNS resolves the service name db, and the client connects to the database’s listening port.

08
Front

Trace the path from a browser to a database through a web app.

Back

First the browser reaches the web app through an exposed host port, load balancer, or other ingress path. The app then resolves the database’s service name, connects to its internal port, and traffic is directed to an available backend.

09
Front

How can Kubernetes clients address a Service across namespaces?

Back

A client in the same Kubernetes namespace can typically use the short Service name. A client in another namespace can qualify it with the namespace, such as db.production.

10
Front

What networking does Docker Compose provide by default for project services?

Back

In Compose, project services join a shared default network and can resolve one another by service name. Custom networks can separate service groups.

11
Front

In Kubernetes, what is the difference between a Service’s port and targetPort?

Back

Kubernetes Service port is the port clients use on the Service; targetPort is the port receiving traffic on the selected Pods.

12
Front

What happens after a request reaches a Kubernetes Service endpoint?

Back

The network or orchestration platform directs the request to an available backend. A stable Service endpoint can represent a changing set of Pods.