Add a /healthz handler to the kubelet server, so that the master can validate kubelet health.

This commit is contained in:
Brendan Burns 2014-07-11 16:45:09 -07:00
parent dcbb309e4f
commit 9f99767b6c

View File

@ -58,6 +58,10 @@ func (s *KubeletServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
return
}
switch {
case u.Path == "/healthz":
w.WriteHeader(http.StatusOK)
w.Write([]byte("ok"))
return
case u.Path == "/container" || u.Path == "/containers":
defer req.Body.Close()
data, err := ioutil.ReadAll(req.Body)