Skip to content

Instantly share code, notes, and snippets.

@jiahuif
Created March 9, 2021 20:16
Show Gist options
  • Save jiahuif/8eae6f0bc89daf600232341088bf3ab0 to your computer and use it in GitHub Desktop.
Save jiahuif/8eae6f0bc89daf600232341088bf3ab0 to your computer and use it in GitHub Desktop.
--- /etc/kubernetes/manifests/kube-controller-manager.manifest 2021-03-09 20:06:23.081318499 +0000
+++ /tmp/kube-controller-manager.manifest 2021-03-09 20:12:54.482769996 +0000
@@ -59,7 +59,11 @@
"--allocate-node-cidrs=true",
"--flex-volume-plugin-dir=/home/kubernetes/flexvolume",
"--pv-recycler-pod-template-filepath-nfs=/home/kubernetes/kube-manifests/kubernetes/pv-recycler-template.yaml",
-"--pv-recycler-pod-template-filepath-hostpath=/home/kubernetes/kube-manifests/kubernetes/pv-recycler-template.yaml"
+"--pv-recycler-pod-template-filepath-hostpath=/home/kubernetes/kube-manifests/kubernetes/pv-recycler-template.yaml",
+"--feature-gates=ControllerManagerLeaderMigration=true",
+"--leader-elect=true",
+"--enable-leader-migration",
+"--leader-migration-config=/etc/leadermigration.conf"
],
"env":[{"name": "KUBE_CACHE_MUTATION_DETECTOR", "value": "false"}],
"livenessProbe": {
@@ -73,7 +77,8 @@
},
"volumeMounts": [
{"name": "cloudconfigmount","mountPath": "/etc/gce.conf", "readOnly": true},
+ {"name": "lmconfigmount","mountPath": "/etc/leadermigration.conf", "readOnly": true},
{"name": "pv-recycler-mount","mountPath": "/home/kubernetes/kube-manifests/kubernetes/pv-recycler-template.yaml", "readOnly": true},
{ "name": "srvkube",
"mountPath": "/etc/srv/kubernetes",
@@ -102,7 +107,8 @@
],
"volumes":[
{"name": "cloudconfigmount","hostPath": {"path": "/etc/gce.conf", "type": "FileOrCreate"}},
+ {"name": "lmconfigmount","hostPath": {"path": "/etc/leadermigration.conf", "type": "FileOrCreate"}},
{"name": "pv-recycler-mount","hostPath": {"path": "/home/kubernetes/kube-manifests/kubernetes/pv-recycler-template.yaml", "type": "FileOrCreate"}},
{ "name": "srvkube",
"hostPath": {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment