AI Hints
Home›Kubernetes Tutorial›Workshop: A Complete Application
Kubernetes · Lesson 67 of 86

Plan the Application

Three tiers, one namespace.

⏱ 2 min read▶ Video at 2:41:52🎓 Free
Watch this lesson in the Kubernetes courseWatch on YouTube ↗Full Kubernetes course

Time to put everything together. In this workshop, we build a small shop, the way a real team would. A web front end, an A P I, and a database cache. One namespace, a few files, and every idea from this course. Let's plan it first, because good plans make building easy.

Plan the Application
From the video: Plan the Application
  • A complete small application
  • Three tiers in one namespace
  • Every idea from the course

The plan

Here is the plan. Visitors come to one address, the ingress. Requests for the slash path go to the web service, which has two pods. Requests for slash A P I go to the A P I service, which also has two pods. The A P I talks to a Redis cache, with one pod. Each tier has its own deployment, and its own service, inside a namespace called shop. Pods are spread by the scheduler, and heal themselves. That is our whole architecture.

The plan
From the video: The plan

The checklist

Let's write the checklist, using what you learned. A namespace, to keep it tidy. Deployments, with at least two replicas for the web, and the A P I. Services, so the tiers can find each other. A config map, to hold the web page, outside the image. Readiness probes and resource requests, so Kubernetes can schedule, and judge health. And one ingress, as the front door. Seven items, and we have used almost every lesson.

ItemWhyLesson
Namespacekeep it tidy13
Deployments, 2+ replicasavailability15
Servicesstable addresses19
ConfigMapsettings outside the image25
Probes and requestshealth and scheduling34, 35
Ingressone front door22

Summary

Good. We have a plan, three tiers, one namespace, and a checklist from the course. Next, we write the files, and build the application, layer by layer.

Key takeaways
  • Web, API, cache
  • One namespace
  • One ingress
Next up: Build It Layer by Layer — from the data tier upward