Kubernetes Examples
Kubernetes manifests and Helm charts for Ops Atlas.
Helm Chart (Recommended)
bash
# Add repository
helm repo add ops-atlas https://charts.opsatlas.io
helm repo update
# Install
helm install ops-atlas ops-atlas/ops-atlas \
--namespace ops-atlas \
--create-namespace \
--set ingress.enabled=true \
--set ingress.hosts[0].host=ops.example.comCustom Values
yaml
# values.yaml
replicaCount: 3
image:
repository: opsatlas/ops-atlas
tag: latest
ingress:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: ops.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: ops-atlas-tls
hosts:
- ops.example.com
postgresql:
enabled: true
auth:
postgresPassword: your-password
redis:
enabled: true
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: 2000m
memory: 2Gi
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10Raw Manifests
Namespace
yaml
apiVersion: v1
kind: Namespace
metadata:
name: ops-atlasDeployment
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: ops-atlas
namespace: ops-atlas
spec:
replicas: 2
selector:
matchLabels:
app: ops-atlas
template:
metadata:
labels:
app: ops-atlas
spec:
containers:
- name: ops-atlas
image: opsatlas/ops-atlas:latest
ports:
- containerPort: 3000
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: ops-atlas-secrets
key: database-url
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: ops-atlas-secrets
key: jwt-secret
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: 2000m
memory: 2Gi
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 5
periodSeconds: 5Service
yaml
apiVersion: v1
kind: Service
metadata:
name: ops-atlas
namespace: ops-atlas
spec:
selector:
app: ops-atlas
ports:
- port: 80
targetPort: 3000
type: ClusterIPIngress
yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ops-atlas
namespace: ops-atlas
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- ops.example.com
secretName: ops-atlas-tls
rules:
- host: ops.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ops-atlas
port:
number: 80Secrets
yaml
apiVersion: v1
kind: Secret
metadata:
name: ops-atlas-secrets
namespace: ops-atlas
type: Opaque
stringData:
database-url: postgres://user:pass@postgres:5432/opsatlas
jwt-secret: your-64-character-secret-key