title: Check health of main container using a sidecar in Kubernetes?
body: <p>Is there a generic way to query a container's health?</p>
  <p>I want to inject a generic sidecar container into every pod which exposes the 'main' container's health on a different endpoint.</p>
  <p>My main container is protected behind <code>oauth2</code> so I cannot do any uptime checks using <code>StatusCake</code> for example.</p>
  <p>The idea was to inject a sidecar which can report only the container health on an exposed path. Then I could configure <code>StatusCake</code> to query that endpoint instead.</p>
  <p>I could query the 'official' health endpoint in my sidecar, but I don't know how to inject the path generically.</p>
  <p>Also I was wondering whether I could check the health via some <code>kubectl</code> command?</p>