Skip to content

Commit 9daace2

Browse files
committed
Add metrics-server ha component
1 parent e0a474b commit 9daace2

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: metrics-server
5+
spec:
6+
replicas: 2
7+
strategy:
8+
rollingUpdate:
9+
maxUnavailable: 1
10+
template:
11+
spec:
12+
affinity:
13+
podAntiAffinity:
14+
requiredDuringSchedulingIgnoredDuringExecution:
15+
- labelSelector:
16+
matchLabels:
17+
k8s-app: metrics-server
18+
namespaces:
19+
- kube-system
20+
topologyKey: kubernetes.io/hostname
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
resources:
5+
- pdb.yaml
6+
patches:
7+
- path: deployment.yaml
8+
target:
9+
kind: Deployment
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: policy/v1beta1
2+
kind: PodDisruptionBudget
3+
metadata:
4+
name: metrics-server
5+
namespace: kube-system
6+
spec:
7+
minAvailable: 1
8+
selector:
9+
matchLabels:
10+
k8s-app: metrics-server

0 commit comments

Comments
 (0)