Skip to content

olaals/knowvember-2025-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes from the ground up with kubectl - Knowvember 2025

Installation and setup

Local Kubernetes and build images

Info

Clone repo

git clone https://github.com/olaals/knowvember-2025-kubernetes.git

Navigate to the workdir folder before starting the tasks with

cd workdir

and create all files there

  • You can use VS Code or another editor with an integrated terminal,
  • or work in a standalone terminal using editors like Vim, Nano, or Emacs.

Tasks

  1. Run frontend pod
  2. Run frontend deployment
  3. Run api deployment
  4. Api service
  5. Job: service account, role and role binding

Extra tasks

  1. Move api to another namespace
  2. Api security context

Wrapping up Wrapping up

Application diagram

Blog Frontend

  • Serves static assets (JavaScript, HTML, and CSS) at the root path /.
  • Proxies all requests under /api to the backend API service.
  • Requires an environment variable UPSTREAM_API specifying the base URL of the API service.
  • Listens on port 8045

Blog API

  • API that interacts with Redis
  • Has an env var REDIS_ADDR that defaults to redis:6379
  • Can spin up Kubernetes jobs for image processing
  • Listens on port 8050

Redis

  • In-memory database used for simplicity
  • Listens on port 6379

Image Job

  • Job for image processing
  • Short-lived containers spun up on demand
  • Reads and writes to Redis
flowchart LR
  User[User Browser]

  subgraph K8s[Kubernetes Cluster]
    FE[blog-frontend]
    API[blog-api]
    JOB[image-job]
    REDIS[redis]
  end

  User -->|HTTP| FE
  FE -->|Serve html and js| User
  FE -->|HTTP| API
  API -.->|create job| JOB
  API -->|read and write| REDIS
  JOB -->|read and write image| REDIS
Loading

When you are done, it is a good idea to turn off kubernetes mode in docker-desktop again, to have less running in the background.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors