This has an explanation of some of the keys in the datastore.
- Create a kind cluster
kind create cluster
Or with a custom config (to use eckd)
kind create cluster --config kind-config.yaml
- Extract api server client certificates and etcd ca cert
docker cp kind-control-plane:/etc/kubernetes/pki pki
Use the v3 api:
export ETCDCTL_API=3
To list all the keys in etcd:
etcdctl --endpoints https://172.19.0.2:2379 --cert pki/apiserver-etcd-client.crt --key pki/apiserver-etcd-client.key --cacert pki/etcd/ca.crt get / --prefix --keys-only
To get a single key with its data in etcd:
etcdctl --endpoints https://172.19.0.2:2379 --cert pki/apiserver-etcd-client.crt --key pki/apiserver-etcd-client.key --cacert pki/etcd/ca.crt get <key-name>
Etcd data seems to be some sort of protobuf format with the majority of the data in normal bytes.
According to their
reference
data is stored in that protobuf format. It should be ok to deserialise an
object into Unknown
type, check the typeMeta.kind
and then further
deserialise the raw
data if the kind is known as a core one, alternatively it
may be json so can also use that as a more general one.