Private
Public Access
1
0
Files
EscapeFromTeacher/k8s/nats.yaml
Sebastian Unterschütz 43680ece16
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m24s
Add NATS deployment and service configuration, integrate environment variables, and update server to support NATS and Redis connections.
2026-01-04 15:37:09 +01:00

56 lines
923 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: nats
labels:
app: nats
spec:
replicas: 1
selector:
matchLabels:
app: nats
template:
metadata:
labels:
app: nats
spec:
containers:
- name: nats
image: nats:2-alpine
ports:
- containerPort: 4222
name: client
- containerPort: 8222
name: monitoring
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
args:
- "-js"
- "-m"
- "8222"
---
apiVersion: v1
kind: Service
metadata:
name: nats-service
labels:
app: nats
spec:
type: ClusterIP
selector:
app: nats
ports:
- port: 4222
targetPort: 4222
name: client
protocol: TCP
- port: 8222
targetPort: 8222
name: monitoring
protocol: TCP