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. During the creation of the KinD cluster, we added an extra port mapping for the control plane node, exposing port 2379
, which is used to access etcd
. In your own production environment, you may not have the etcd
port exposed for external requests, but the process of backing up the database will still be similar to the steps explained in this section.
Backing up the required certificates
Most Kubernetes installations store certificates in /etc/kubernetes/pki
. In this respect, KinD is no different, so we can back up our certificates using the docker cp
command.
We have said it a few times: etcd
is very important! So, it stands to reason that accessing the database directly probably has...