[英]How does one list all the resourceVersion of a kubernetes object?
How does one list all the resourceVersion of a Kubernetes object? 如何列出Kubernetes对象的所有resourceVersion?
For instance, I want to retrieve all the resourceVersions of a configmap from the past. 例如,我想从过去检索configmap的所有resourceVersions。 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).
如果这是可能的,我想观看来自configmap的过去resourceVersion的所有更改(这是我的解决方法,我想尝试)。 Because currently, K8s does not support rollback of ConfigMaps.
因为目前,K8s不支持回滚ConfigMaps。
Here is the ongoing feature request for that:- https://github.com/kubernetes/kubernetes/issues/22368 以下是正在进行的功能请求: - https://github.com/kubernetes/kubernetes/issues/22368
How does one list all the resourceVersion of a Kubernetes object?
如何列出Kubernetes对象的所有resourceVersion?
Not supported by the API side yet as of this writing. 截至本文撰写时,API方不支持。 (Also, as described in the issue) Also, deleted objects can be kept in etcd for the value of
--auto-compaction-retention
, I suppose you can change that value if you want to keep the objects longer and query etcd with etdctl
. (另外,如问题中所述)另外,删除的对象可以保存在etcd中以获取
--auto-compaction-retention
的值,我想你可以改变那个值,如果你想让对象更长,并用etdctl
查询etdctl
。
Another sort of brute force option is to back up etcd and then restore it on some other node, then manually query etcd for that particular snapshot. 另一种强力选项是备份 etcd然后在其他节点上恢复它,然后手动查询该特定快照的etcd。
For example to get the kube-proxy
ConfigMap: 例如,获取
kube-proxy
ConfigMap:
$ etcdctl --endpoints=https://:2379 get "/registry/configmaps/kube-system/kube-proxy" --cert=client.crt --key=client.key --cacert=ca.crt $ etcdctl --endpoints = https://:2379 get“/ registry / configmaps / kube-system / kube-proxy”--cert = client.crt --key = client.key --cacert = ca.crt
These are some other backup tools: 这些是一些其他备份工具:
As you mentioned, there's a feature request for historical versions. 正如您所提到的,有一个历史版本的功能请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.