Local Kubernetes and build images
Clone repo
git clone https://github.com/olaals/knowvember-2025-kubernetes.git
Navigate to the workdir folder before starting the tasks with
cd workdirand 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.
- Run frontend pod
- Run frontend deployment
- Run api deployment
- Api service
- Job: service account, role and role binding
Extra tasks
Wrapping up Wrapping up
Blog Frontend
- Serves static assets (JavaScript, HTML, and CSS) at the root path
/. - Proxies all requests under
/apito the backend API service. - Requires an environment variable
UPSTREAM_APIspecifying the base URL of the API service. - Listens on port
8045
Blog API
- API that interacts with Redis
- Has an env var
REDIS_ADDRthat defaults toredis: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
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.