Mike:
Hey team, what is the easiest way to get the history of a replica set via kubectl ? I am looking to find out the deployments replica set number from 2 days earlier ? There was an issue where I needed to figure out the replica set number for each deployment 2-3 days ago. Hoping someone here might have an answer?
Rocky:
Looking at Events help…
Mike:
Unfortunately it doesn’t go that far out
unnivkn:
Hi @Mike if you have any centralized logging system, you may refer that, else please try the below options.
$ kubectl logs -h
-p, --previous[=false]: If true, print the logs for the previous instance of the container in a pod if it exists.
kubectl logs <podname> --previous
Show all logs from pod nginx written in the last hour
kubectl logs --since=1h nginx
kubectl get events -n <your_app_namespace> --sort-by=‘.metadata.creationTimestamp’
Also please check the logs in /var/log/containers/ location, on your worker node
where the pods are running
Mike:
Thank you guys! I’ll check these out