Skip to content
Snippets Groups Projects
Verified Commit e4ff8eb6 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

fix(kube-system): Repair quorum idea for masters

This patch fixes the usage of the PodDisruptionBudget (PDB) in order to
achieve a quorum functionality for the master nodes by deploying a pause
container on all of them. Main reason to do that, is the inability of a
PDB to operate on static-pods or daemonsets. Therefore this deployment
will make sure, that only one master node will become unavailable at the
time.
parent 772cfa5b
No related branches found
No related tags found
No related merge requests found
......@@ -12,12 +12,12 @@ spec:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: etcd
name: quorum
namespace: kube-system
spec:
maxUnavailable: 1
selector:
matchLabels:
component: etcd
component: quorum
tier: control-plane
apiVersion: apps/v1
kind: Deployment
metadata:
name: quorum
namespace: kube-system
labels:
component: quorum
tier: control-plane
spec:
replicas: 3
selector:
matchLabels:
component: quorum
tier: control-plane
template:
metadata:
labels:
component: quorum
tier: control-plane
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
operator: In
values:
- quorum
topologyKey: kubernetes.io/hostname
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers:
- name: pause
image: k8s.gcr.io/pause
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment