Kubernetes livenessProbe http result?

0 votes

We have an http livenessProbe setup which returns a 500 if service is faulty and prints out what the problem is.
Is there any way to view the output that was returned by livenessProbe?

Currently the only thing that I see doing pod describe:

Killing container with id docker://12568746c312e6646fd6ecdb2123db448be0bc6808629b1a63ced8b7298be444:pod "test-3893895584-7f4cr_test(524091bd-49d8-11e7-bd00-42010a840224)" container "test" is unhealthy, it will be killed and re-created.
Sep 5, 2018 in Kubernetes by Hannah
• 14,080 points
38 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Sadly there is no way to access HHTP response in case of failed HTTP probe.
answered Sep 5, 2018 by lina
• 8,100 points
0 votes

inititally i thought there could be a way and i tried the following

func DoHTTPProbe(url *url.URL, headers http.Header, client HTTPGetInterface) (probe.Result, string, error) {
    // ...
    body := string(b)
    if res.StatusCode >= http.StatusOK && res.StatusCode < http.StatusBadRequest {
        glog.V(4).Infof("Probe succeeded for %s, Response: %v", url.String(), *res)
        return probe.Success, body, nil
    }
    glog.V(4).Infof("Probe failed for %s with request headers %v, response body: %v", url.String(), headers, body)
    return probe.Failure, fmt.Sprintf("HTTP probe failed with statuscode: %d", res.StatusCode), nil
}

But it doesnt work

answered Sep 5, 2018 by Kalgi
• 35,800 points

Related Questions In Kubernetes

0 votes
1 answer
+5 votes
2 answers

Redirecting host to service path in kubernetes

What you are trying to do is ...READ MORE

answered Mar 27, 2018 in Kubernetes by DragonLord999
• 8,360 points
51 views
0 votes
1 answer

unable to start Kubernetes due to so many open files in system

You can try the following steps: You can ...READ MORE

answered May 1, 2018 in Kubernetes by shubham
• 6,480 points
136 views
0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,000 points
166 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
480 views
+3 votes
1 answer
+1 vote
4 answers

Kubernetes- HTTPS API return `Unauthorized`

One way to do this is by ...READ MORE

answered Sep 5, 2018 in Kubernetes by u_told_me_to
54 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.