etcdctl can reach it (you need to know which flags to provide, e.g., for tls certs and so on).glide installed in PATH, e.g., go get -u github.com/Masterminds/glide).
$GOPATH/bin (export PATH="$GOPATH/bin/:$PATH")go get -u github.com/jpbetz/auger
cd $GOPATH/src/github.com/jpbetz/auger
go get -u github.com/Masterminds/glide
make vendor
# Stay in this directory
manifest from /etc/kubernetes/manifests directory.etcdctl probably needs to be run inside the etcd container on one of the Kubernetes masters.ETCDCTL_API=3 etcdctl \
get /registry/ --keys-only --prefix
I recommend you to keep the session on the server for etcdctl open and after finding the correct key to export it using export YOUR_OBJECT_PATH=__PATH__ as it will be used like this later on.
etcdctl probably needs to be run inside the etcd container on one of the Kubernetes masters.Replace $YOUR_OBJECT_PATH with the path of the object or set it as a variable.
ETCDCTL_API=3 etcdctl \
--endpoints=https://[127.0.0.1]:2379 \
--cacert=/var/lib/minikube/certs//etcd/ca.crt \
--cert=/var/lib/minikube/certs//etcd/healthcheck-client.crt \
--key=/var/lib/minikube/certs//etcd/healthcheck-client.key \
get $YOUR_OBJECT_PATH > etcd-data-old.bin
Copy etcd-data-old.bin to the host, e.g.:
scp $SSH_USER@$SSH_HOST:etcd-data-old.bin .
cat etcd-data-old.bin | \
go run main.go decode > object.yaml
Now edit the object.yaml as you need.
cat object.yaml | \
go run main.go encode > etcd-data-new.bin
Copy the etcd-data-new.bin to the host, e.g.:
scp etcd-data-new.bin $SSH_USER@$SSH_HOST:
etcdctl probably needs to be run inside the etcd container on one of the Kubernetes masters.cat etcd-data-new.bin | \
ETCDCTL_API=3 etcdctl \
--endpoints=https://[127.0.0.1]:2379 \
--cacert=/var/lib/minikube/certs//etcd/ca.crt \
--cert=/var/lib/minikube/certs//etcd/healthcheck-client.crt \
--key=/var/lib/minikube/certs//etcd/healthcheck-client.key \
put $YOUR_OBJECT_PATH
Just run kubectl get OBJECT_KIND OBJECT_NAME -o yaml on the object you just edited to ensure it is still in working order.
If it returns the objects YAML, you are fine. In case of errors, such as illegal bytes or so, you should restore a backup ASAP!