{"id":1475,"date":"2023-05-23T13:41:05","date_gmt":"2023-05-23T13:41:05","guid":{"rendered":"http:\/\/patriciocerda.com\/?p=1475"},"modified":"2023-05-26T09:53:22","modified_gmt":"2023-05-26T09:53:22","slug":"openshift-etcd-backup-and-restore-with-kasten-k10-part-2","status":"publish","type":"post","link":"https:\/\/patriciocerda.com\/?p=1475","title":{"rendered":"OpenShift ETCD backup and Restore with Kasten K10 &#8211; Part 2"},"content":{"rendered":"<p>Hi all and welcome back.\u00a0 This is the second part of the <a title=\"OpenShift ETCD backup and Restore with Kasten K10 \u2013 Part 1\" href=\"https:\/\/patriciocerda.com\/?p=1467\">previous blog post of backing up and restore ETCD<\/a> in an OpenShift cluster using Kasten K10.\u00a0 We already explained what is ETCD and why in some scenarios could be good to have an ETCD backup.\u00a0 So, in this post we will describe the process to backup ETCD using Kasten.<\/p>\n<p>When using Kasten we can automate the ETCD backup process, and sending the backup to a specific Location Profile (repository) defined in Kasten.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contenidos<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/patriciocerda.com\/?p=1475\/#What_we_need\" >What we need:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/patriciocerda.com\/?p=1475\/#Creating_a_Secret\" >Creating a Secret<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/patriciocerda.com\/?p=1475\/#Create_a_Kanister_Blueprint\" >Create a Kanister Blueprint<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/patriciocerda.com\/?p=1475\/#Create_a_Backup_Policy\" >Create a Backup Policy<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_we_need\"><\/span>What we need:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>We need the etcd endpoint of at least one of the master nodes. It is possible to get it using the following command:<\/li>\n<\/ul>\n<style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-1 > .CodeMirror, .fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-color1);}.fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-color2); }.fusion-syntax-highlighter-1 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color8); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-1 fusion-syntax-highlighter-theme-light\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-color3);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_1\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_1\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_1\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"default\" data-mode=\"text\/x-sh\">oc get node -l node-role.kubernetes.io\/master=\"\" -ojsonpath='{.items[0].status.addresses[?(@.type==\"InternalIP\")].address}'<\/textarea><\/div>\n<ul>\n<li>The etcd pod labels.\u00a0 In the case of <code class=\"docutils literal notranslate\"><span class=\"pre\">OCP<\/span><\/code>, it is likely that etcd pods have labels <code class=\"docutils literal notranslate\"><span class=\"pre\">app=etcd,etcd=true<\/span><\/code><\/li>\n<li>The namespace in which the etcd pods are running.\u00a0\u00a0 In the case of <code class=\"docutils literal notranslate\"><span class=\"pre\">OCP<\/span><\/code>, it is likely that etcd pods are running in the namespace <code class=\"docutils literal notranslate\"><span class=\"pre\">openshift-etcd<\/span><\/code><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Creating_a_Secret\"><\/span>Creating a Secret<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before taking a backup of ETCD with Kasten, we need to create a Secret in a temporary new or existing namespace.\u00a0 So first we are going to create a temporary namespace:<\/p>\n<style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-2 > .CodeMirror, .fusion-syntax-highlighter-2 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-color1);}.fusion-syntax-highlighter-2 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-color2); }.fusion-syntax-highlighter-2 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color8); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-2 fusion-syntax-highlighter-theme-light\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-color3);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_2\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_2\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_2\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"default\" data-mode=\"text\/x-sh\">oc create ns etcd-backup<\/textarea><\/div>\n<p>&nbsp;<\/p>\n<p>Next, we create the Secret with the data collected previously:<\/p>\n<style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-3 > .CodeMirror, .fusion-syntax-highlighter-3 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-color1);}.fusion-syntax-highlighter-3 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-color2); }.fusion-syntax-highlighter-3 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color8); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-3 fusion-syntax-highlighter-theme-light\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-color3);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_3\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_3\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_3\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"default\" data-mode=\"text\/x-sh\">oc create secret generic etcd-details \\\n     --from-literal=endpoints=https:\/\/10.0.133.5:2379 \\\n     --from-literal=labels=app=etcd,etcd=true \\\n     --from-literal=etcdns=openshift-etcd \\\n     --namespace etcd-backup<\/textarea><\/div>\n<p>&nbsp;<\/p>\n<p>To make sure we are taking a backup of just the Secret, and not of any other workload in the namespace, we can label the Secret we have just created with the following command:<\/p>\n<style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-4 > .CodeMirror, .fusion-syntax-highlighter-4 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-color1);}.fusion-syntax-highlighter-4 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-color2); }.fusion-syntax-highlighter-4 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color8); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-4 fusion-syntax-highlighter-theme-light\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-color3);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_4\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_4\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_4\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"default\" data-mode=\"text\/x-sh\">oc label secret -n etcd-backup etcd-details include=true<\/textarea><\/div>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1476\" src=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-300x63.png\" alt=\"\" width=\"686\" height=\"144\" srcset=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-200x42.png 200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-300x63.png 300w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-400x84.png 400w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-600x125.png 600w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-768x160.png 768w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-800x167.png 800w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-1024x214.png 1024w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-1200x251.png 1200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.03.57-1536x321.png 1536w\" sizes=\"(max-width: 686px) 100vw, 686px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Create_a_Kanister_Blueprint\"><\/span>Create a Kanister Blueprint<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In order to backup ETCD, Kasten will leverage a <a href=\"https:\/\/docs.kasten.io\/latest\/kanister\/kanister.html\" target=\"_blank\" rel=\"noopener\">Kanister<\/a> blueprint to do so.\u00a0 Therefore, the next step is creating the Blueprint that will be used by Kasten when taking an ETCD backup.\u00a0\u00a0 Kasten provides a Kanister blueprint you can use to take an ETCD backup from an OpenShift cluster.\u00a0 You can download and create the blueprint in the Kasten namespace using the following command:<\/p>\n<style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-5 > .CodeMirror, .fusion-syntax-highlighter-5 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-color1);}.fusion-syntax-highlighter-5 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-color2); }.fusion-syntax-highlighter-5 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color8); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-5 fusion-syntax-highlighter-theme-light\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-color3);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_5\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_5\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_5\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"default\" data-mode=\"text\/x-sh\">oc --namespace kasten-io apply -f \\\n    https:\/\/raw.githubusercontent.com\/kanisterio\/kanister\/0.91.0\/examples\/etcd\/etcd-in-cluster\/ocp\/blueprint-v2\/etcd-incluster-ocp-blueprint.yaml<\/textarea><\/div>\n<p>&nbsp;<\/p>\n<p>If you check the blueprint, for the backup process you can see two important phases:<\/p>\n<ul>\n<li>\n<div>\n<div><strong>takeSnapshot<\/strong>: Where the blueprint will run a Pod using the Kanister image.\u00a0 This pod, using the data provided in the Secret created previously, will get the ETCD pods and will take a snapshot of ETCD.\u00a0 The Snapshot will be saved in \/tmp\/etcd-backup.db<\/div>\n<\/div>\n<\/li>\n<li>\n<div>\n<div><strong>uploadSnapshot<\/strong>: This phase will be used to upload the ETCD snapshot to the Location Profile (repository) selected when the Policy is created (described in the next section)<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-6 > .CodeMirror, .fusion-syntax-highlighter-6 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-color1);}.fusion-syntax-highlighter-6 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-color2); }.fusion-syntax-highlighter-6 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color8); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-6 fusion-syntax-highlighter-theme-light\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-color3);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_6\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_6\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_6\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"default\" data-mode=\"text\/x-sh\">    phases:\n    - func: KubeTask\n      name: takeSnapshot\n      args:\n        image: ghcr.io\/kanisterio\/kanister-kubectl-1.18:0.91.0\n        command:\n          - sh\n          - -o\n          - errexit\n          - -o\n          - pipefail\n          - -c\n          - |\n            export endpoints=\"{{ index .Object.data \"endpoints\" | toString | b64dec }}\"\n            export labels=\"{{ index .Object.data \"labels\" | toString | b64dec }}\"\n            export etcdns=\"{{ index .Object.data \"etcdns\" | toString | b64dec }}\"\n            # Get a member of etcd cluster\n            ETCD_POD=$(kubectl get pods -n $etcdns -l $labels -ojsonpath='{.items[0].metadata.name}')\n            # exec the snapshot save command\n            kubectl exec -it -n $etcdns $ETCD_POD -c etcd -- sh -c \"ETCDCTL_ENDPOINTS=$endpoints etcdctl snapshot save \/tmp\/etcd-backup.db\"\n            # this pod name will be used to copy and remove the snapshot\n            kando output etcdPod $ETCD_POD\n            kando output etcdNS $etcdns\n\n    - func: KubeTask\n      name: uploadSnapshot\n      args:\n        image: ghcr.io\/kanisterio\/kanister-kubectl-1.18:0.91.0\n        command:\n          - sh\n          - -o\n          - errexit\n          - -o\n          - pipefail\n          - -c\n          - |\n            BACKUP_LOCATION='etcd-backup.db.gz'\n            kubectl cp -c etcd {{ .Phases.takeSnapshot.Output.etcdNS }}\/{{ .Phases.takeSnapshot.Output.etcdPod }}:\/tmp\/etcd-backup.db \/tmp\/etcd-backup.db\n            gzip -c \/tmp\/etcd-backup.db  | kando location push --profile '{{ toJson .Profile }}' --path \"${BACKUP_LOCATION}\" --output-name \"kopiaOutput\" -\n<\/textarea><\/div>\n<p>&nbsp;<\/p>\n<p>Once the blueprint is created we need to create an annotation for the Secret created in the previous step, to instruct Kasten to use this Secret alongside the Kanister Blueprint to take the ETCD backup.<\/p>\n<style type=\"text\/css\" scopped=\"scopped\">.fusion-syntax-highlighter-7 > .CodeMirror, .fusion-syntax-highlighter-7 > .CodeMirror .CodeMirror-gutters {background-color:var(--awb-color1);}.fusion-syntax-highlighter-7 > .CodeMirror .CodeMirror-gutters { background-color: var(--awb-color2); }.fusion-syntax-highlighter-7 > .CodeMirror .CodeMirror-linenumber { color: var(--awb-color8); }<\/style><div class=\"fusion-syntax-highlighter-container fusion-syntax-highlighter-7 fusion-syntax-highlighter-theme-light\" style=\"opacity:0;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:14px;border-width:1px;border-style:solid;border-color:var(--awb-color3);\"><div class=\"syntax-highlighter-copy-code\"><span class=\"syntax-highlighter-copy-code-title\" data-id=\"fusion_syntax_highlighter_7\" style=\"font-size:14px;\">Copy to Clipboard<\/span><\/div><label for=\"fusion_syntax_highlighter_7\" class=\"screen-reader-text\">Syntax Highlighter<\/label><textarea class=\"fusion-syntax-highlighter-textarea\" id=\"fusion_syntax_highlighter_7\" data-readOnly=\"nocursor\" data-lineNumbers=\"1\" data-lineWrapping=\"\" data-theme=\"default\" data-mode=\"text\/x-sh\">oc annotate secret -n etcd-backup etcd-details kanister.kasten.io\/blueprint='etcd-blueprint'\n      secret\/etcd-details annotated<\/textarea><\/div>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Create_a_Backup_Policy\"><\/span>Create a Backup Policy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The last step to taking an ETCD backup with Kasten is to create a Backup Policy for the temporary namespace:<\/p>\n<ul>\n<li>We create a new Policy, provide the name, frequency and retention settings according to your needs.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1479\" src=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-221x300.png\" alt=\"\" width=\"221\" height=\"300\" srcset=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-200x272.png 200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-221x300.png 221w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-400x544.png 400w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-600x816.png 600w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-753x1024.png 753w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-768x1045.png 768w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-800x1088.png 800w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-1129x1536.png 1129w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-1200x1632.png 1200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04-1506x2048.png 1506w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.18.04.png 1916w\" sizes=\"(max-width: 221px) 100vw, 221px\" \/><\/a><\/p>\n<ul>\n<li>We select the namespace to backup (etcd-backup in this example).<\/li>\n<li>Then we filter resources to include just resources with the label &#8220;include:true&#8221; as mentioned before.\u00a0 In this way, just the secret will be backed up by this policy.\u00a0 Then it will be Kanister the one responsible of taking the ETCD backup using the Blueprint previously created.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1481\" src=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-300x219.png\" alt=\"\" width=\"300\" height=\"219\" srcset=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-200x146.png 200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-300x219.png 300w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-400x292.png 400w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-600x438.png 600w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-768x561.png 768w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-800x584.png 800w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-1024x747.png 1024w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-1200x876.png 1200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34-1536x1121.png 1536w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.20.34.png 1592w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<ul>\n<li>Finally, we set the Location Profile (repository) for the ETCD backup created by the Kanister Blueprint.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1482\" src=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-300x275.png\" alt=\"\" width=\"300\" height=\"275\" srcset=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-200x183.png 200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-300x275.png 300w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-400x366.png 400w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-600x549.png 600w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-768x703.png 768w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-800x733.png 800w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-1024x938.png 1024w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-1200x1099.png 1200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-23-a-las-13.23.17-1536x1407.png 1536w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Once the policy is created, we can review the policy in Kasten web UI, and we can click in &#8220;Run Once&#8221; to test the policy.<\/p>\n<p><a href=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1478\" src=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-300x178.png\" alt=\"\" width=\"447\" height=\"265\" srcset=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-200x119.png 200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-300x178.png 300w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-400x237.png 400w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-600x356.png 600w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-768x455.png 768w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-800x474.png 800w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-1024x607.png 1024w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-1200x712.png 1200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.48-1536x911.png 1536w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Finally, we can see the policy has completed successfully, and now we have a fully automated ETCD backup for a RedHat OpenShift cluster.<\/p>\n<p><a href=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1477\" src=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-300x143.png\" alt=\"\" width=\"399\" height=\"190\" srcset=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-200x96.png 200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-300x143.png 300w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-400x191.png 400w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-600x287.png 600w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-768x367.png 768w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-800x382.png 800w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-1024x489.png 1024w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-1200x573.png 1200w, https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/Captura-de-pantalla-2023-05-17-a-las-18.17.01-1536x734.png 1536w\" sizes=\"(max-width: 399px) 100vw, 399px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>To continue with the restore process, please check the next post in this series: <a href=\"https:\/\/patriciocerda.com\/?p=1487\" target=\"_blank\" rel=\"noopener\">https:\/\/patriciocerda.com\/?p=1487<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi all and welcome back.\u00a0 This is the second part<\/p>\n","protected":false},"author":1,"featured_media":1471,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[25,67,27,68,43],"tags":[37,33,32,29,31,69,38,30],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>OpenShift ETCD backup and Restore with Kasten K10 - Part 2 - vLatam<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/patriciocerda.com\/?p=1475\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OpenShift ETCD backup and Restore with Kasten K10 - Part 2 - vLatam\" \/>\n<meta property=\"og:description\" content=\"Hi all and welcome back.\u00a0 This is the second part\" \/>\n<meta property=\"og:url\" content=\"https:\/\/patriciocerda.com\/?p=1475\" \/>\n<meta property=\"og:site_name\" content=\"vLatam\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-23T13:41:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-26T09:53:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"pcerda\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pcerda\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/patriciocerda.com\/?p=1475\",\"url\":\"https:\/\/patriciocerda.com\/?p=1475\",\"name\":\"OpenShift ETCD backup and Restore with Kasten K10 - Part 2 - vLatam\",\"isPartOf\":{\"@id\":\"https:\/\/patriciocerda.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/patriciocerda.com\/?p=1475#primaryimage\"},\"image\":{\"@id\":\"https:\/\/patriciocerda.com\/?p=1475#primaryimage\"},\"thumbnailUrl\":\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png\",\"datePublished\":\"2023-05-23T13:41:05+00:00\",\"dateModified\":\"2023-05-26T09:53:22+00:00\",\"author\":{\"@id\":\"https:\/\/patriciocerda.com\/#\/schema\/person\/613aa192d7dbcedcd20e08318891aa2a\"},\"breadcrumb\":{\"@id\":\"https:\/\/patriciocerda.com\/?p=1475#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/patriciocerda.com\/?p=1475\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/patriciocerda.com\/?p=1475#primaryimage\",\"url\":\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png\",\"contentUrl\":\"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/patriciocerda.com\/?p=1475#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/patriciocerda.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenShift ETCD backup and Restore with Kasten K10 &#8211; Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/patriciocerda.com\/#website\",\"url\":\"https:\/\/patriciocerda.com\/\",\"name\":\"vLatam\",\"description\":\"El Blog de Patricio Cerda\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/patriciocerda.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/patriciocerda.com\/#\/schema\/person\/613aa192d7dbcedcd20e08318891aa2a\",\"name\":\"pcerda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/patriciocerda.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/patriciocerda.com\/wp-content\/litespeed\/avatar\/ce92117b9294544adeaad229a8fbac13.jpg?ver=1776167859\",\"contentUrl\":\"https:\/\/patriciocerda.com\/wp-content\/litespeed\/avatar\/ce92117b9294544adeaad229a8fbac13.jpg?ver=1776167859\",\"caption\":\"pcerda\"},\"url\":\"https:\/\/patriciocerda.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OpenShift ETCD backup and Restore with Kasten K10 - Part 2 - vLatam","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/patriciocerda.com\/?p=1475","og_locale":"en_US","og_type":"article","og_title":"OpenShift ETCD backup and Restore with Kasten K10 - Part 2 - vLatam","og_description":"Hi all and welcome back.\u00a0 This is the second part","og_url":"https:\/\/patriciocerda.com\/?p=1475","og_site_name":"vLatam","article_published_time":"2023-05-23T13:41:05+00:00","article_modified_time":"2023-05-26T09:53:22+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png","type":"image\/png"}],"author":"pcerda","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pcerda","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/patriciocerda.com\/?p=1475","url":"https:\/\/patriciocerda.com\/?p=1475","name":"OpenShift ETCD backup and Restore with Kasten K10 - Part 2 - vLatam","isPartOf":{"@id":"https:\/\/patriciocerda.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/patriciocerda.com\/?p=1475#primaryimage"},"image":{"@id":"https:\/\/patriciocerda.com\/?p=1475#primaryimage"},"thumbnailUrl":"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png","datePublished":"2023-05-23T13:41:05+00:00","dateModified":"2023-05-26T09:53:22+00:00","author":{"@id":"https:\/\/patriciocerda.com\/#\/schema\/person\/613aa192d7dbcedcd20e08318891aa2a"},"breadcrumb":{"@id":"https:\/\/patriciocerda.com\/?p=1475#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/patriciocerda.com\/?p=1475"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/patriciocerda.com\/?p=1475#primaryimage","url":"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png","contentUrl":"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/patriciocerda.com\/?p=1475#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/patriciocerda.com\/"},{"@type":"ListItem","position":2,"name":"OpenShift ETCD backup and Restore with Kasten K10 &#8211; Part 2"}]},{"@type":"WebSite","@id":"https:\/\/patriciocerda.com\/#website","url":"https:\/\/patriciocerda.com\/","name":"vLatam","description":"El Blog de Patricio Cerda","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/patriciocerda.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/patriciocerda.com\/#\/schema\/person\/613aa192d7dbcedcd20e08318891aa2a","name":"pcerda","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/patriciocerda.com\/#\/schema\/person\/image\/","url":"https:\/\/patriciocerda.com\/wp-content\/litespeed\/avatar\/ce92117b9294544adeaad229a8fbac13.jpg?ver=1776167859","contentUrl":"https:\/\/patriciocerda.com\/wp-content\/litespeed\/avatar\/ce92117b9294544adeaad229a8fbac13.jpg?ver=1776167859","caption":"pcerda"},"url":"https:\/\/patriciocerda.com\/?author=1"}]}},"jetpack_featured_media_url":"https:\/\/patriciocerda.com\/wp-content\/uploads\/2023\/05\/IntroBlog1467.png","_links":{"self":[{"href":"https:\/\/patriciocerda.com\/index.php?rest_route=\/wp\/v2\/posts\/1475"}],"collection":[{"href":"https:\/\/patriciocerda.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patriciocerda.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patriciocerda.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patriciocerda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1475"}],"version-history":[{"count":3,"href":"https:\/\/patriciocerda.com\/index.php?rest_route=\/wp\/v2\/posts\/1475\/revisions"}],"predecessor-version":[{"id":1498,"href":"https:\/\/patriciocerda.com\/index.php?rest_route=\/wp\/v2\/posts\/1475\/revisions\/1498"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/patriciocerda.com\/index.php?rest_route=\/wp\/v2\/media\/1471"}],"wp:attachment":[{"href":"https:\/\/patriciocerda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patriciocerda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patriciocerda.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}