Kubernetes & Helm
Prerequisites
Section titled “Prerequisites”- Kubernetes cluster (v1.24+)
- Helm v3.8+
- kubectl configured
Quick Install
Section titled “Quick Install”# Add the JustAPI Helm repositoryhelm repo add justapi https://justapi.dev/chartshelm repo update
# Installhelm upgrade --install my-app justapi/justapi \ --set image.repository=myregistry/my-app \ --set image.tag=latestHelm Chart Structure
Section titled “Helm Chart Structure”helm/justapi/├── Chart.yaml├── values.yaml├── templates/│ ├── deployment.yaml│ ├── service.yaml│ ├── ingress.yaml│ ├── hpa.yaml│ ├── configmap.yaml│ ├── secret.yaml│ └── serviceaccount.yaml└── _helpers.tplConfiguration Reference
Section titled “Configuration Reference”| Parameter | Default | Description |
|---|---|---|
replicaCount |
2 |
Number of replicas |
image.repository |
— | Container image |
image.tag |
latest |
Image tag |
image.pullPolicy |
Always |
Pull policy |
service.port |
8080 |
Service port |
ingress.enabled |
false |
Enable ingress |
ingress.host |
— | Ingress hostname |
ingress.tls |
false |
Enable TLS |
resources.limits.cpu |
"1000m" |
CPU limit |
resources.limits.memory |
"512Mi" |
Memory limit |
hpa.enabled |
true |
Enable HPA |
hpa.minReplicas |
2 |
Min pods |
hpa.maxReplicas |
10 |
Max pods |
hpa.targetCPUUtilization |
70 |
CPU target % |
config.rustLog |
"info" |
RUST_LOG value |
config.otelServiceName |
"justapi" |
OTel service name |
secret.databaseUrl |
— | DB connection string |
secret.redisUrl |
— | Redis connection string |
Deployment with Custom Configuration
Section titled “Deployment with Custom Configuration”helm upgrade --install my-app justapi/justapi \ --set replicaCount=4 \ --set resources.limits.cpu="2000m" \ --set resources.limits.memory="1Gi" \ --set hpa.targetCPUUtilization=50 \ --set config.rustLog="debug" \ --set ingress.enabled=true \ --set ingress.host="api.example.com"Ingress with TLS
Section titled “Ingress with TLS”ingress: enabled: true host: api.example.com tls: true className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prodHealth Check Probes
Section titled “Health Check Probes”The chart configures Kubernetes probes automatically:
- Liveness:
GET /health— Is the process alive? - Readiness:
GET /ready— Is the app ready to serve traffic? - Startup:
GET /health— Has the app finished starting?
See Also
Section titled “See Also”- Docker — Containerize your app
- Production Checklist — Production readiness
- Helm Chart Source