Deployment Configurations
This reference documents the Kubernetes Deployment and StatefulSet configurations used across the GovTech Multicloud Platform.Frontend Deployment
The frontend deployment runs a React application served by Nginx.Configuration
platform/kubernetes/frontend/deployment.yaml:1-19
Resource Limits
The frontend has modest resource requirements as it serves static files:platform/kubernetes/frontend/deployment.yaml:78-84
Health Checks
Nginx health probes ensure the frontend is responsive:platform/kubernetes/frontend/deployment.yaml:54-75
Security Context
platform/kubernetes/frontend/deployment.yaml:87-94
Backend Deployment
The backend deployment runs the Node.js API application.Configuration
platform/kubernetes/backend/deployment.yaml:1-19
Resource Limits
The backend requires more resources for API processing:platform/kubernetes/backend/deployment.yaml:71-79
Health Checks
The backend uses/api/health endpoint for health checks:
platform/kubernetes/backend/deployment.yaml:44-68
Environment Configuration
platform/kubernetes/backend/deployment.yaml:38-42
Database StatefulSet
PostgreSQL runs as a StatefulSet to maintain persistent storage and stable network identity.Configuration
platform/kubernetes/database/statefulset.yaml:14-30
Volume Claim Template
StatefulSet automatically creates persistent volume claims:platform/kubernetes/database/statefulset.yaml:38-47
Resource Limits
platform/kubernetes/database/statefulset.yaml:107-113
Health Checks
PostgreSQL usespg_isready for health verification:
platform/kubernetes/database/statefulset.yaml:125-150
Rolling Update Strategy
Both frontend and backend use RollingUpdate strategy:- maxSurge: 1 - Create 1 extra pod during updates
- maxUnavailable: 0 - Never have all pods down during updates
- terminationGracePeriodSeconds: 30 - Allow 30s for graceful shutdown
Security Best Practices
All deployments implement:- runAsNonRoot: true - Containers don’t run as root user
- readOnlyRootFilesystem - Prevents filesystem modifications (where possible)
- Drop all capabilities - Minimal Linux capabilities
- allowPrivilegeEscalation: false - Prevents privilege escalation
Configuration Management
Applications receive configuration through:- ConfigMaps - Non-sensitive configuration (
govtech-config) - Secrets - Sensitive data like database credentials (
govtech-secrets) - Environment variables - Application-specific settings