<p>How does one list all the resourceVersion of a Kubernetes object?</p>

<p>For instance, I want to retrieve all the resourceVersions of a configmap from the past. If this is possible I would like to watch all the changes from the past resourceVersion(s) of the configmap (this is my workaround, which I would like to try). Because currently, K8s does not support rollback of ConfigMaps.</p>

<p>Here is the ongoing feature request for that:- <a href="https://github.com/kubernetes/kubernetes/issues/22368" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/22368</a></p>

Suhas Chikkanna
<blockquote>
  <p>How does one list all the resourceVersion of a Kubernetes object?</p>
</blockquote>

<p>Not supported by the API side yet as of this writing. (Also, as described in the issue) Also, deleted objects can be kept in etcd for the value of <a href="https://coreos.com/etcd/docs/latest/op-guide/configuration.html" rel="nofollow noreferrer"><code>--auto-compaction-retention</code></a>, I suppose you can change that value if you want to keep the objects longer and query etcd with <code>etdctl</code>.</p>

<p>Another sort of brute force option is to <a href="https://support.coreos.com/hc/en-us/articles/115000323894-Creating-etcd-backup" rel="nofollow noreferrer">back up</a> etcd and then <a href="https://coreos.com/etcd/docs/latest/op-guide/recovery.html" rel="nofollow noreferrer">restore</a> 
 it on some other node, then manually query etcd for that particular snapshot.</p>

<p>For example to get the <code>kube-proxy</code> ConfigMap:</p>

<p>$ etcdctl --endpoints=https://:2379 get "/registry/configmaps/kube-system/kube-proxy" --cert=client.crt --key=client.key --cacert=ca.crt</p>

<p>These are some other backup tools:</p>

<ul>
<li><a href="https://github.com/giantswarm/etcd-backup" rel="nofollow noreferrer">https://github.com/giantswarm/etcd-backup</a></li>
<li><a href="https://coreos.com/operators/etcd/docs/latest/user/walkthrough/backup-operator.html" rel="nofollow noreferrer">https://coreos.com/operators/etcd/docs/latest/user/walkthrough/backup-operator.html</a></li>
</ul>

<p>As you mentioned, there's a feature request for historical versions.</p>
