
Protéger une capsule contre l'expulsion avec les budgets de perturbation de capsule dans Kubernetes
(. . â ) Kubernetes-. , podâ . preStop
podâ , , podâ . podâ, podâ, . PodDisruptionBudgets ( PDB), .
PodDisruptionBudgets: podâ
pod (PDB) â , podâ ( ).
, podâ , , , , . drain , podâ, .
pod PodDisruptionBudget
, podâ . , pod (PDB), pod Nginx deployment-, :
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: nginx-pdb
spec:
minAvailable: 1
selector:
matchLabels:
app: nginx
Kubernetes, , 1 pod, app: nginx
. , Kubernetes podâ drain-, podâ drain-.
, , . prestop-, readiness probes service . , . , , , , .
, :

, . , podâ :

podâ, drain . , drain , podâ Nginx. drain ( , ), drain .
, , , drain . , drain , ââ ( NoSchedule
), podâ . .
, , drain ââ podâ :

, , drain podâ . , drain control plane, Pod Disruption Budget (PDB).
, control plane , PDB . , control plane , . , 2 podâ. podâ 1, PDB . , pod , , , . , , control plane , , podâ 0, PDB.
, , 1 . drain 1 podâ, drain 2 :


podâ , Deployment
. ââ NoSchedule
, scheduler :

, pod , 1 , drain 1 .
drain 2 control plane PDB, . , pod, , , , drain 2 , podâ (PDB). :



, podâ , , podâ . , - drain , Kubernetes !
, :
- lifecycle , .
- podâ
- podâ (PDB), , podâ .
, â !
! . terratest, k8s endpoint. , , 300 . , , .
Kubernetes AWS , Gruntwork.io.
: