8/45

Deploy and Expose an App

easy 10 XP ~6 minHands-on lab

The quote-engine service is moving to Kubernetes. Its container is already configured to listen on port 9000; other workloads in the cluster will reach it on port 5000 through a stable Service name.

Task

  • Create a Deployment quote-engine in namespace inventory with 3 replicas of the image caddy:2.8.
  • Its Pods carry the labels app=quote-engine and tier=backend, and the container declares port 9000.
  • Create a Service quote-engine-svc of type ClusterIP in the same namespace that accepts traffic on port 5000 and forwards it to port 9000 of the Pods.
  • The Service routes to every ready replica of quote-engine, and to nothing else.

A practice cluster is running on this machine: start with kubectl get all -n inventory.

About this machine

Ubuntu 24.04 with a private practice cluster: a real Kubernetes API server, scheduler and controllers, and three nodes (controlplane, node01, node02). Containers are simulated, so images never download and kubectl logs/exec are not available. k is an alias for kubectl, with completion. The grader checks the cluster's final state, not the commands you typed.

TerminalNot started

Your machine is ready to start

Create a free account to open a machine and get graded.