Kubernetes Deployment
Deploy Dits on Kubernetes for enterprise-grade scalability, high availability, and automated operations.
Production Ready
Kubernetes deployment includes auto-scaling, rolling updates, and self-healing.
Prerequisites
- Kubernetes cluster 1.24+
- kubectl configured
- Helm 3.x (optional but recommended)
- Persistent storage provisioner
Helm Installation
Add the Dits Helm Repository
# Add repository
helm repo add dits https://charts.dits.io
helm repo update
# Install with default values
helm install dits dits/dits-server
# Or customize with values file
helm install dits dits/dits-server -f values.yamlExample values.yaml
replicaCount: 3
image:
repository: dits/dits-server
tag: latest
pullPolicy: IfNotPresent
resources:
limits:
cpu: 2000m
memory: 4Gi
requests:
cpu: 500m
memory: 1Gi
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 10
targetCPUUtilizationPercentage: 70
postgresql:
enabled: true
auth:
postgresPassword: changeme
database: dits
redis:
enabled: true
auth:
enabled: false
persistence:
enabled: true
size: 100Gi
storageClass: standard
ingress:
enabled: true
className: nginx
hosts:
- host: dits.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: dits-tls
hosts:
- dits.example.comManual Kubernetes Manifests
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: dits-server
labels:
app: dits
spec:
replicas: 3
selector:
matchLabels:
app: dits
template:
metadata:
labels:
app: dits
spec:
containers:
- name: dits
image: dits/dits-server:latest
ports:
- containerPort: 8080
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: dits-secrets
key: database-url
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: dits-secrets
key: jwt-secret
resources:
limits:
cpu: "2"
memory: 4Gi
requests:
cpu: "500m"
memory: 1Gi
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: dits-dataScaling
Horizontal Pod Autoscaler
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: dits-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: dits-server
minReplicas: 3
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70Pod Disruption Budget
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: dits-pdb
spec:
minAvailable: 2
selector:
matchLabels:
app: ditsMonitoring
Dits exposes Prometheus metrics at /metrics. Configure a ServiceMonitor for automatic scraping:
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: dits-monitor
spec:
selector:
matchLabels:
app: dits
endpoints:
- port: http
path: /metrics
interval: 30sCloud Provider Integration
For managed Kubernetes services (GKE, EKS, AKS), see our cloud-specific deployment guides for optimized configurations.