[root@icp-ha-boot ~]# kubectl -n kube-system get pods | grep "k8s-etcd" | awk  'NR==1{print $1}' k8s-etcd-172.24.19.201 [root@icp-ha-boot ~]# kubectl -n kube-system exec k8s-etcd-172.24.19.201 -- sh  -c "export ETCDCTL_API=3; etcdctl --cert /etc/cfc/conf/etcd/client.pem --key  /etc/cfc/conf/etcd/client-key.pem --cacert /etc/cfc/conf/etcd/ca.pem  --endpoints https://172.24.19.201:4001 snapshot save snapshot.db" Snapshot saved at snapshot.db [root@icp-ha-boot ~]# ls -sh . total 30M 30M snapshot.db apiVersion: batch/v1 kind: Job metadata: name: etcddump namespace: kube-system spec: template: spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: beta.kubernetes.io/arch operator: In values: - amd64 - ppc64le - s390x - key: master operator: In Example 3-6 The etcd-backup_job.yaml file 2. Run the  snapshot  command: 3. Copy the  snapshot.db  file from the etcd container to the local machine: 4. Verify the backup exists: 1. Create a PersistentVolume (PV) and PersistentVolumeClaim (PVC), similar to the  examples in Example 3-1 on page 84 and Example 3-2 on page 85 to store the etcd  snapshot. This job definition uses the same PV and PVC created in those examples. 2. Create the  etcd-backup_job.yaml  file shown in Example 3-6. Alternatively, download the  file from the following location:  etcd can be snapshot to a PersistentVolume using a Kubernetes job. For security and  isolation from the worker nodes, the pods created in this job are scheduled to a master node.  Perform the following steps on any machine that has  kubectl  configured to access to the  cluster: https://github.com/IBMRedbooks/SG248440-IBM-Cloud-Private-System-Administrator- s-Guide/tree/master/Ch3-Backup-and-Restore/Backup/etcd-backup_job.yaml Backup etcd using a Kubernetes job 90  IBM Cloud Private System Administrator’s Guide [root@icp-ha-boot ~]# kubectl cp kube-system/k8s-etcd-172.24.19.201:snapshot.db .