Files
myceliumcloud-examples/examples/nginx-mycelium/nginx-global.yaml

60 lines
1.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-global-proxy
namespace: default
labels:
app: nginx-global-proxy
network: mycelium-global
spec:
replicas: 3
selector:
matchLabels:
app: nginx-global-proxy
template:
metadata:
labels:
app: nginx-global-proxy
network: mycelium-global
spec:
# 🔑 Host network for direct Mycelium IPv6 access
hostNetwork: true
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- nginx-global-proxy
topologyKey: kubernetes.io/hostname
containers:
- name: nginx-proxy
image: nginx:alpine
ports:
- containerPort: 8080
hostPort: 8080
- containerPort: 8081
hostPort: 8081
- containerPort: 8082
hostPort: 8082
resources:
requests:
memory: "32Mi"
cpu: "100m"
limits:
memory: "64Mi"
cpu: "200m"
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 3
periodSeconds: 5