Files
conti-backend/k8s/pdb.yaml
T
2026-08-17 15:31:27 +08:00

29 lines
883 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PodDisruptionBudget:保证节点维护、AKS 节点池升级这类**自愿中断**时至少留一个副本在跑。
# 没有它,一次节点池升级可能把两个副本同时驱逐,造成一次没人预料到的短暂全站不可用。
#
# 注意 PDB 只管自愿中断(drain/evict),管不了节点宕机、OOMKilled 这类非自愿中断——
# 那是 replicas + 探针的事。
#
# Dev 没有 PDB:单节点 k3s 上 replicas=1minAvailable: 1 会让节点永远 drain 不掉。
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: conti-backend-pdb
namespace: retailapp-uat
spec:
minAvailable: 1
selector:
matchLabels:
app: conti-backend
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: conti-backend-pdb
namespace: retailapp-prod
spec:
minAvailable: 1
selector:
matchLabels:
app: conti-backend