kubernetes-handbook/tools/etcd/get-kubernetes-keys-from-et...

8 lines
223 B
Bash
Raw Normal View History

2018-01-17 15:58:19 +08:00
#!/bin/bash
# Get kubernetes keys from etcd
export ETCDCTL_API=3
keys=`etcdctl get /registry --prefix -w json|python -m json.tool|grep key|cut -d ":" -f2|tr -d '"'|tr -d ","`
for x in $keys;do
echo $x|base64 -d|sort
done