-
Notifications
You must be signed in to change notification settings - Fork 0
Tech Story: Kubernetes manifests and cluster setup #101
Copy link
Copy link
Open
Labels
backendBackend services and logicBackend services and logicconfigConfiguration and feature flagsConfiguration and feature flagsfrontendFrontend app and dashboardFrontend app and dashboardtech-storyTechnical implementation storyTechnical implementation story
Milestone
Description
Tech Story
As a platform engineer, I want the Station application deployed to a Kubernetes cluster with all required services so that we have a scalable, self-healing production environment with clear separation between application and infrastructure concerns.
Context
Currently no k8s manifests exist. Station requires: NestJS backend, React frontend (nginx), PostgreSQL, Redis, and eventually a Discord bot container. All should be deployable from a single kubectl apply or Helm chart.
Acceptance Criteria
- Namespace
stationcreated for all resources - Backend:
Deployment,Service,HorizontalPodAutoscaler - Frontend:
Deployment(nginx),Service - PostgreSQL:
StatefulSetwithPersistentVolumeClaim(or external managed DB — decision to be made) - Redis:
DeploymentorStatefulSetwith persistence -
Ingressresource routing/api→ backend,/→ frontend - TLS via cert-manager + Let's Encrypt (
ClusterIssuerconfigured) - Secrets (
JWT_SECRET, DB credentials, etc.) stored as k8sSecrets(not in manifests) -
ConfigMapfor non-sensitive environment config -
readinessProbeandlivenessProbeon all application pods - Resource
requestsandlimitsset on all containers - Manifests organised under
k8s/directory in repo root
Technical Elaboration
- Use
nginxingress controller (or Traefik — decision to be made based on host) - cert-manager
Certificateresource +ClusterIssuerfor Let's Encrypt ACME - Consider
kustomizeoverlays fordevvsproductionenvironments - PostgreSQL: evaluate managed DB (e.g. cloud provider) vs in-cluster
StatefulSetfor production - Secrets: evaluate external secrets operator or sealed secrets vs manual
kubectl create secret
Notes
- CI/CD pipeline issue (story: CI/CD pipeline for staging and production #90) should be updated or created alongside this to build/push images and apply manifests on merge to main
- Decision on managed vs in-cluster Postgres should be documented as an ADR
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendBackend services and logicBackend services and logicconfigConfiguration and feature flagsConfiguration and feature flagsfrontendFrontend app and dashboardFrontend app and dashboardtech-storyTechnical implementation storyTechnical implementation story