我正在尝试从 kubernetes 集群中的 etcd v3 检索值。这些值似乎已编码,并且不会完整返回。当 时-w simple
,返回的值带有很多小菱形中的问号。使用 时-w json
,返回值如下:
ubuntu@k8s-master-0:~$ etcdctl --endpoints=https://127.0.0.1:2379 -w json get /registry/services/specs/default/kubernetes-bootcamp
{"header":{"cluster_id":13533136872321707204,"member_id":12171258639343793897,"revision":1142056,"raft_term":53},"kvs":[{"key":"L3JlZ2lzdHJ5L3NlcnZpY2VzL3NwZWNzL2RlZmF1bHQva3ViZXJuZXRlcy1ib290Y2FtcA==","create_revision":863556,"mod_revision":863556,"version":1,"value":"azhzAAoNCgJ2MRIHU2VydmljZRLaAQp3ChNrdWJlcm5ldGVzLWJvb3RjYW1wEgAaB2RlZmF1bHQiACokNzBhNDdlZDgtODFjZS0xMWU3LWE2ZGMtZmExNjNlYmZlNzM5MgA4AEILCLOmzMwFEOaHwTdaGgoDcnVuEhNrdWJlcm5ldGVzLWJvb3RjYW1wegASWwoXCgASA1RDUBiYPyIHCAAQkD8aACjR+QESGgoDcnVuEhNrdWJlcm5ldGVzLWJvb3RjYW1wGgwxMC4yMzMuNTIuNzEiDExvYWRCYWxhbmNlcjoETm9uZUIAUgAaAgoAGgAiAA=="}],"count":1}
键和值似乎已编码,但我找不到获取纯文本值的方法。
如何获取给定键的纯文本值?