I'm using Kubernetes via Google Container Engine.
I have a deployment object with 5 replicas, running for 12 days. It appears that Kubernetes rescheduled my pod a few times in the last 12 days. Is there an event log that I could look up to see the exact history of that deployment object, when it rescheduled pods, etc..?
I poked around in both Google Cloud Logging (which is enabled for my cluster) and kubectl events
but haven't found anything.
This will give you an event history for a particular pod:
kubectl describe <pod>
It's possible they are gone though, this github issue suggests that events are garbage collected, but I'm not clear for how long.
For anybody arriving here in 2020, and using GKE - the Events are indeed garbage collected approximately every hour according to K8s docs ("... events are removed one hour after the last occurrence."), but in modern GKE installations, all events are logged to Stackdriver and can be found by searching the Google Cloud Logging service for something like:
logName="projects/[project-name]/logs/events"
resource.type="k8s_cluster"
resource.labels.location="us-east1"
resource.labels.cluster_name="production"