Performing an etcd backup
Since we are using KinD for our Kubernetes cluster, we can create a backup of the etcd database, but we will not be able to restore it.
Our etcd server is running in a pod on the cluster called etcd-cluster01-control-plane
, located in the kube-system
namespace. The running container includes the etcdctl
utility, and we can execute a backup using kubectl
commands.
Backing up the required certificates
Most Kubernetes installations store certificates in /etc/kuberetes/pki
. In this respect, KinD is no different, so we can back up our certificates using the docker cp
command. Let's see how to do this in two simple steps:
- First, we will create a directory to store the certificates and the etcd database. Change your directory to the
chapter13
folder where you cloned the book repository. Under thechapter13
folder, create a directory namedbackup
and make it your current path:mkdir backup cd ./backup
- To back up the certificates located...