mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Ask monit health check kubelet; if failed, restart.
This commit is contained in:
parent
43b4f41202
commit
7a47ea8913
@ -3,4 +3,7 @@ group kubelet
|
|||||||
start program = "/etc/init.d/kubelet start"
|
start program = "/etc/init.d/kubelet start"
|
||||||
stop program = "/etc/init.d/kubelet stop"
|
stop program = "/etc/init.d/kubelet stop"
|
||||||
if does not exist then restart
|
if does not exist then restart
|
||||||
|
if failed port 10250
|
||||||
|
protocol HTTP request "/healthz"
|
||||||
|
with timeout 10 seconds
|
||||||
|
then restart
|
||||||
|
@ -165,13 +165,11 @@ func (s *Server) handleHealthz(w http.ResponseWriter, req *http.Request) {
|
|||||||
|
|
||||||
// Check that the hostname known by the master matches the hostname
|
// Check that the hostname known by the master matches the hostname
|
||||||
// the kubelet knows
|
// the kubelet knows
|
||||||
/*
|
|
||||||
hostname := s.host.GetHostname()
|
hostname := s.host.GetHostname()
|
||||||
if masterHostname != hostname {
|
if masterHostname != hostname && masterHostname != "127.0.0.1" && masterHostname != "localhost" {
|
||||||
s.error(w, errors.New("Kubelet hostname \""+hostname+"\" does not match the hostname expected by the master \""+masterHostname+"\""))
|
s.error(w, errors.New("Kubelet hostname \""+hostname+"\" does not match the hostname expected by the master \""+masterHostname+"\""))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
w.Write([]byte("ok"))
|
w.Write([]byte("ok"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user