Skip to content

Commit

Permalink
Add a PodDisruptionBudget for CoreDNS
Browse files Browse the repository at this point in the history
During testing on GitHub runners in the CI pipeline, it was observed
that the CoreDNS pods were susceptible to unexpected evictions,
especially when nodes experienced disk pressure. The PDB should protect
the last pod from being evicted.

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Oct 11, 2023
1 parent f9de64b commit 92f9086
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/component/controller/coredns.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,20 @@ spec:
- key: Corefile
path: Corefile
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: coredns
namespace: kube-system
labels:
k8s-app: kube-dns
kubernetes.io/name: "CoreDNS"
spec:
minAvailable: 50%
selector:
matchLabels:
k8s-app: kube-dns
---
apiVersion: v1
kind: Service
metadata:
Expand Down

0 comments on commit 92f9086

Please sign in to comment.