This commit is contained in:
2025-08-25 21:19:56 +02:00
parent d999645a44
commit 70ea862759

View File

@@ -30,9 +30,13 @@ metadata:
namespace: dns
spec:
replicas: 1
selector: { matchLabels: { app: etcd } }
selector:
matchLabels:
app: etcd
template:
metadata: { labels: { app: etcd } }
metadata:
labels:
app: etcd
spec:
containers:
- name: etcd
@@ -44,16 +48,28 @@ spec:
- --listen-client-urls=http://[::]:2379
- --advertise-client-urls=http://etcd.dns.svc:2379
ports:
- { name: client, containerPort: 2379, protocol: TCP }
- { name: client, containerPort: 2379, protocol: TCP }
# probes use loopback to avoid IPv6 node->pod path
startupProbe:
exec:
command: ["/bin/sh","-c","curl -s --max-time 1 http://[::1]:2379/health | grep -q true"]
failureThreshold: 30
periodSeconds: 2
readinessProbe:
httpGet: { path: /health, port: 2379 }
initialDelaySeconds: 2
exec:
command: ["/bin/sh","-c","curl -s --max-time 1 http://[::1]:2379/health | grep -q true"]
periodSeconds: 3
livenessProbe:
exec:
command: ["/bin/sh","-c","curl -s --max-time 1 http://[::1]:2379/health | grep -q true"]
periodSeconds: 10
volumeMounts:
- { name: data, mountPath: /var/lib/etcd }
- { name: data, mountPath: /var/lib/etcd }
volumes:
- name: data
persistentVolumeClaim: { claimName: etcd-data }
- name: data
persistentVolumeClaim:
claimName: etcd-data
---
apiVersion: v1
kind: ConfigMap