DEV Community

Aisalkyn Aidarova
Aisalkyn Aidarova

Posted on

WEEKEND HOMEWORK — DEVOPS FOUNDATION + KUBERNETES

This homework is not about memorizing definitions. Your task is to prove that you understand where everything lives, what each component does, and how everything connects together.

Your assignment

Create a 10–15 minute screen recording with your voice.

You may draw the architecture on paper, whiteboard, PowerPoint, Excalidraw, or on your computer.

Do not read definitions from Google, ChatGPT, or your notes during the recording. Explain everything in your own words as if you are answering an interview question.


TASK 1 — Build a Computer

Draw a computer/server:

COMPUTER / SERVER
┌──────────────────────────────┐
│ CPU                          │
│ RAM                          │
│ Storage / SSD                │
│ Network                      │
│ Operating System             │
└──────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Explain:

CPU

  • What is CPU?
  • What does CPU do?
  • What is a CPU core?
  • What does 100m, 500m, 1000m mean in Kubernetes?
  • Does CPU store files?

RAM

  • What is RAM?
  • Why does an application need RAM?
  • RAM vs Storage?
  • What can happen when an application runs out of memory?
  • What does OOMKilled mean?

Storage

  • What is SSD/storage?
  • What normally remains after a reboot?
  • RAM vs persistent storage?

TASK 2 — Explain Operating System

Explain:

  • What is an Operating System?
  • Why does a computer need an OS?
  • What is Linux?
  • What does the OS manage?
  • What is the Kernel?
  • Application vs Process vs Service.
  • Why do servers commonly run Linux?

You must be able to explain this relationship:

Hardware / Virtual Hardware
        ↓
CPU + RAM + Storage + Network
        ↓
Operating System
        ↓
Applications / Processes
Enter fullscreen mode Exit fullscreen mode

TASK 3 — Computer vs Server vs EC2

Explain:

  • What is a computer?
  • What is a server?
  • Is a server also a computer?
  • What makes a computer act as a server?
  • What is AWS EC2?
  • Is EC2 an Operating System?
  • Where does Linux run when we create an Ubuntu EC2 instance?
  • Where are CPU and RAM in this architecture?

Draw:

AWS
 ↓
EC2 Instance
 ↓
CPU + RAM + Storage + Network
 ↓
Linux OS
 ↓
Applications
Enter fullscreen mode Exit fullscreen mode

TASK 4 — Networking

Explain:

  • What is an IP address?
  • What is a Private IP?
  • What is a Public IP?
  • Private IP vs Public IP.
  • What is a Port?
  • What are ports 22, 80, and 443 commonly used for?
  • What is an AWS Security Group?
  • Why can an application be running but still not open in your browser?

Explain this:

Your Laptop
     ↓
Internet
     ↓
Public endpoint / Public IP
     ↓
Security Group
     ↓
Port
     ↓
Server
     ↓
Application
Enter fullscreen mode Exit fullscreen mode

TASK 5 — Image vs Container

This section is very important.

Explain:

  • What is a Docker Image?
  • What is a Container?
  • Image vs Container.
  • Is an Image a running application?
  • Can we create multiple Containers from the same Image?
  • What is a Container Runtime?
  • What is Docker/containerd doing?
  • Where does an Image come from?

Draw:

Container Registry
ECR / Docker Hub
        ↓
      Image
        ↓
Container Runtime
        ↓
     Container
        ↓
   Application
Enter fullscreen mode Exit fullscreen mode

Use Nginx as your example:

nginx:1.27 Image
       ↓
Container Runtime
       ↓
Nginx Container
       ↓
Nginx Process
Enter fullscreen mode Exit fullscreen mode

Do not say that the Image itself is running.


TASK 6 — Connect This to Kubernetes

Now extend your architecture.

Explain:

  • What is Kubernetes?
  • What is EKS?
  • What is a Cluster?
  • What is a Control Plane?
  • What is a Worker Node?
  • What is a Pod?
  • Container vs Pod.
  • Worker Node vs Pod.
  • Where does the Container run?
  • Where does the Pod run?
  • Where are CPU and RAM?

Draw:

EKS CLUSTER

Control Plane
      ↓
Scheduler
      ↓

WORKER NODE / EC2
┌─────────────────────────────┐
│ CPU                         │
│ RAM                         │
│ Storage                     │
│ Network                     │
│ Linux OS                    │
│                             │
│   Pod                       │
│   ┌─────────────────────┐   │
│   │ Container           │   │
│   │                     │   │
│   │ Nginx Application   │   │
│   └─────────────────────┘   │
└─────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

You must clearly explain:

Worker Node is the server. Pod runs on the Worker Node. Container runs inside the Pod. Application runs inside the Container.


TASK 7 — Explain How Kubernetes Uses an Image

Explain what happens when Kubernetes sees:

containers:
  - name: nginx
    image: nginx:1.27
Enter fullscreen mode Exit fullscreen mode

Explain the complete process:

Deployment / Pod specification
          ↓
image: nginx:1.27
          ↓
Scheduler chooses Worker Node
          ↓
Container Runtime on Node
          ↓
Obtains Image if necessary
          ↓
Creates Container
          ↓
Nginx starts running
Enter fullscreen mode Exit fullscreen mode

Explain the difference between:

Image → Container → Pod → Worker Node


TASK 8 — Deployment and ReplicaSet

Explain:

  • What is a Deployment?
  • What is a ReplicaSet?
  • What are replicas?
  • What does replicas: 3 mean?
  • What is desired state?
  • What happens if you delete one Deployment-managed Pod?
  • Who recreates it?

Draw:

Deployment
    ↓
ReplicaSet
    ↓
┌─────┬─────┬─────┐
Pod   Pod   Pod
Enter fullscreen mode Exit fullscreen mode

Then explain:

Desired = 3
Actual = 2
     ↓
Controller reconciliation
     ↓
New Pod
     ↓
Actual = 3
Enter fullscreen mode Exit fullscreen mode

TASK 9 — Service

Explain:

  • Why shouldn't users connect directly to changing Pod IP addresses?
  • What is a Kubernetes Service?
  • What is ClusterIP?
  • What is LoadBalancer?
  • What are Labels?
  • What is a Selector?
  • What are Endpoints?
  • How does a Service know which Pods belong to it?

Draw:

Users
  ↓
AWS Load Balancer
  ↓
Kubernetes Service
  ↓
selector: app=nginx
  ↓
┌─────┬─────┬─────┐
Pod   Pod   Pod
Enter fullscreen mode Exit fullscreen mode

Explain what happens if:

Service selector = app: nginx

Pod label = app: restaurant
Enter fullscreen mode Exit fullscreen mode

TASK 10 — ConfigMap and Secret

Explain:

  • What is ConfigMap?
  • What should we store in ConfigMap?
  • What is Secret?
  • ConfigMap vs Secret.
  • Why shouldn't passwords be hard-coded into application code or normal configuration?
  • How can a Pod receive a value from ConfigMap or Secret?

Draw:

ConfigMap ──────┐
                ↓
               Pod
                ↑
Secret ─────────┘
Enter fullscreen mode Exit fullscreen mode

TASK 11 — Resources

Explain:

resources:
  requests:
    cpu: "100m"
    memory: "128Mi"

  limits:
    cpu: "500m"
    memory: "256Mi"
Enter fullscreen mode Exit fullscreen mode

Explain:

  • What is requests?
  • What is limits?
  • Why does Scheduler care about requests?
  • What does 100m CPU mean?
  • What does 500m CPU mean?
  • What can happen when CPU reaches its limit?
  • What can happen when Memory exceeds its limit?

Calculate:

6 Pods
Each requests 100m CPU

Total CPU request = ?
Enter fullscreen mode Exit fullscreen mode

Then:

6 Pods
Each requests 128Mi Memory

Total Memory request = ?
Enter fullscreen mode Exit fullscreen mode

TASK 12 — Readiness and Liveness

Explain the difference:

Readiness
"Should Kubernetes send traffic to this Pod?"

Liveness
"Is this workload healthy enough to keep running?"
Enter fullscreen mode Exit fullscreen mode

Answer:

  • Can a Pod be Running but 0/1 Ready?
  • What happens when Readiness fails?
  • What can happen after repeated Liveness failures?
  • Why do we need both?

TASK 13 — HPA

Explain:

  • What is HPA?
  • What does Horizontal scaling mean?
  • What is Metrics Server?
  • Where does HPA get CPU metrics?
  • What is minReplicas?
  • What is maxReplicas?
  • What does averageUtilization: 50 mean?
  • Why is requests.cpu important for CPU-utilization HPA?
  • Does HPA directly create Pods?
  • Does HPA create Worker Nodes?

Draw:

Users / Traffic ↑
       ↓
Service
       ↓
Pods
       ↓
CPU utilization ↑
       ↓
kubelet
       ↓
Metrics Server
       ↓
HPA
       ↓
Desired replicas ↑
       ↓
Deployment / ReplicaSet
       ↓
More Pods
Enter fullscreen mode Exit fullscreen mode

TASK 14 — FULL ARCHITECTURE

This is the most important part of the homework.

Without notes, draw one complete architecture:

USER
 ↓
Browser
 ↓
DNS
 ↓
Public Endpoint / Load Balancer
 ↓
AWS Networking / Security
 ↓
Kubernetes Service
 ↓
Pod
 ↓
Container
 ↓
Nginx Application
 ↓
CPU + RAM


                 EKS CLUSTER

              Control Plane
                    ↓
                 Scheduler
                    ↓

              WORKER NODE
        ┌──────────────────────┐
        │ EC2 Server           │
        │                      │
        │ CPU                  │
        │ RAM                  │
        │ Storage              │
        │ Network              │
        │ Linux OS             │
        │                      │
        │ Pod                  │
        │  └─ Container        │
        │      └─ Nginx        │
        └──────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Then explain the entire journey of one user request.

Example scenario:

A customer opens the Restaurant Company website.

Start with the customer and continue until Nginx returns the response.

Do not skip CPU, RAM, OS, Server, Network, Service, Pod or Container.


TASK 15 — TROUBLESHOOTING INTERVIEW

Imagine the interviewer tells you:

“Our website is down. How would you troubleshoot it?”

Do NOT answer:

“I will restart the Pod.”

You don't know the root cause yet.

Explain your investigation:

Is Worker Node healthy?
        ↓
Are Pods Running?
        ↓
Are Pods Ready?
        ↓
What do Pod Events say?
        ↓
What do application logs say?
        ↓
Is Service correct?
        ↓
Does Service have Endpoints?
        ↓
Do Labels match Selectors?
        ↓
Are Probes passing?
        ↓
Are ConfigMap/Secret correct?
        ↓
Are Resources sufficient?
        ↓
Is Load Balancer working?
        ↓
Networking / Security Group / Ports?
        ↓
DNS?
Enter fullscreen mode Exit fullscreen mode

Mention commands you would use:

kubectl get nodes
kubectl get pods
kubectl describe pod <POD>
kubectl logs <POD>
kubectl get svc
kubectl get endpoints
kubectl get pods --show-labels
kubectl top nodes
kubectl top pods
kubectl get hpa
kubectl describe hpa <HPA>
Enter fullscreen mode Exit fullscreen mode

FINAL SUBMISSION

Submit one 10–15 minute video recording.

Your video must include:

  1. Draw and explain CPU, RAM, Storage, OS and Server.
  2. Explain Private IP vs Public IP.
  3. Explain Image vs Container.
  4. Explain Container vs Pod.
  5. Explain Worker Node vs Pod.
  6. Explain Deployment → ReplicaSet → Pods.
  7. Explain Service → Labels → Selectors → Endpoints.
  8. Explain ConfigMap and Secret.
  9. Explain Requests and Limits.
  10. Explain Readiness and Liveness.
  11. Explain Metrics Server and HPA.
  12. Draw the complete architecture from User → Application.
  13. Explain one troubleshooting scenario.

Important rules

Do not read from notes. Do not just show commands. Do not memorize sentences without understanding them.

For every component, answer:

What is it?
Where does it live?
What does it do?
Why do we need it?
What happens if it fails?

The goal is that on Monday, if an interviewer asks:

“Explain how your application runs in Kubernetes.”

you can draw the architecture and explain the complete system confidently from CPU and Operating System all the way to Kubernetes and HPA.

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.