I have defined readiness and liveness probes for the container in a Kubernetes deployment. When these fail I expect to see their output included in an event for the pod. However I don't see such events. I do see other events for the same pod.
I am running on GKE, with Kubernetes v1.6.4.
The code that should produce the events is here: https://github.com/kubernetes/kubernetes/blob/v1.6.4/pkg/kubelet/prober/prober.go#L94.
What I see instead is logs indicating that a "ref" for the container could not be retrieved. I see similar logs for other places in the code that try to record container-related events.
Is this a bug? These events are potentially very useful. In particular it's the only way to see output from a failing probe so that I can diagnose probes that are failing unexpectedly.
[I'm not certain if this is an appropriate issue for StackOverflow. Please let me know if it would be better raised as an issue in Github.]
This was a bug that has been fixed in Kubernetes 1.6.7.