Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

KubeControllerManagerDown & kubeSchedulerDown #34

Closed
pduany opened this issue Apr 16, 2021 · 3 comments
Closed

KubeControllerManagerDown & kubeSchedulerDown #34

pduany opened this issue Apr 16, 2021 · 3 comments
Labels

Comments

@pduany
Copy link

pduany commented Apr 16, 2021

Hi
First thing thank you for your content you put up. I am attempting to build a cluster of 3 Pi 4's that I ran this script against.
After getting the monitoring running I am seeing an alert for the KubeController and the Scheduler are down. I think I have found the solution but have no idea how to apply it can you point me in the right direction?

this is the patch

kubeadm-patches/kube-controller-manager+json.yaml

  • op: add
    path: /spec/containers/0/command/-
    value: --bind-address=SOME_IP
  • op: replace
    path: /spec/containers/0/livenessProbe/httpGet/host
    value: SOME_IP
  • op: replace
    path: /spec/containers/0/startupProbe/httpGet/host
    value: SOME_IP

kubeadm-patches/kube-scheduler+json.yaml

  • op: add
    path: /spec/containers/0/command/-
    value: --bind-address=SOME_IP
  • op: replace
    path: /spec/containers/0/livenessProbe/httpGet/host
    value: SOME_IP
  • op: replace
    path: /spec/containers/0/startupProbe/httpGet/host
    value: SOME_IP

it was from this GitHub posting
kubernetes/kubeadm#2388
the other one is this
prometheus-operator/kube-prometheus#718

Thanks
Patrick

@avoidik
Copy link

avoidik commented Apr 17, 2021

in kubeadm case these patches intended to change kubernetes manifests before kubeadm starting control-plane configuration step, so you can apply them directly to the yaml files manually using something like json-patch (in other cases at run-time using kubectl patch)

from the gnu diff/patch perspective it's just

diff -rupN /etc/kubernetes/manifests/kube-controller-manager.yaml /etc/kubernetes/manifests-patched/kube-controller-manager.yaml
--- /etc/kubernetes/manifests/kube-controller-manager.yaml	2021-04-17 13:11:15.495965723 +0000
+++ /etc/kubernetes/manifests-patched/kube-controller-manager.yaml	2021-04-17 13:10:40.371967358 +0000
@@ -31,12 +31,13 @@ spec:
     - --service-account-private-key-file=/etc/kubernetes/pki/sa.key
     - --service-cluster-ip-range=10.41.0.0/16
     - --use-service-account-credentials=true
+    - --bind-address=192.168.50.10
     image: k8s.gcr.io/kube-controller-manager:v1.20.5
     imagePullPolicy: IfNotPresent
     livenessProbe:
       failureThreshold: 8
       httpGet:
-        host: 127.0.0.1
+        host: 192.168.50.10
         path: /healthz
         port: 10257
         scheme: HTTPS
@@ -50,7 +51,7 @@ spec:
     startupProbe:
       failureThreshold: 9
       httpGet:
-        host: 127.0.0.1
+        host: 192.168.50.10
         path: /healthz
         port: 10257
         scheme: HTTPS
diff -rupN /etc/kubernetes/manifests/kube-scheduler.yaml /etc/kubernetes/manifests-patched/kube-scheduler.yaml
--- /etc/kubernetes/manifests/kube-scheduler.yaml	2021-04-17 13:11:15.495965723 +0000
+++ /etc/kubernetes/manifests-patched/kube-scheduler.yaml	2021-04-17 13:10:40.371967358 +0000
@@ -17,12 +17,13 @@ spec:
     - --kubeconfig=/etc/kubernetes/scheduler.conf
     - --leader-elect=true
     - --port=0
+    - --bind-address=192.168.50.10
     image: k8s.gcr.io/kube-scheduler:v1.20.5
     imagePullPolicy: IfNotPresent
     livenessProbe:
       failureThreshold: 8
       httpGet:
-        host: 127.0.0.1
+        host: 192.168.50.10
         path: /healthz
         port: 10259
         scheme: HTTPS
@@ -36,7 +37,7 @@ spec:
     startupProbe:
       failureThreshold: 9
       httpGet:
-        host: 127.0.0.1
+        host: 192.168.50.10
         path: /healthz
         port: 10259
         scheme: HTTPS

@stale
Copy link

stale bot commented Jul 16, 2021

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Jul 16, 2021
@stale
Copy link

stale bot commented Aug 17, 2021

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@stale stale bot closed this as completed Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants