{"id":25227,"date":"2026-06-29T15:41:49","date_gmt":"2026-06-29T21:41:49","guid":{"rendered":"https:\/\/sada.services\/?p=25227"},"modified":"2026-06-29T15:41:49","modified_gmt":"2026-06-29T21:41:49","slug":"okd-apagar","status":"publish","type":"post","link":"https:\/\/sada.services\/?p=25227","title":{"rendered":"OKD: Apagar"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li>Ingresamos a okd-provisioner<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh okd-provisioner-nodo01<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Verificaciones previas<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Obtener los nodos actuales<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>oc get nodes<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"778\" height=\"190\" src=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-552.png\" alt=\"\" class=\"wp-image-25228\" srcset=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-552.png 778w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-552-300x73.png 300w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-552-768x188.png 768w\" sizes=\"(max-width: 778px) 100vw, 778px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Revisar la expiraci\u00f3n de certificados<\/li>\n\n\n\n<li>Para asegurar que el cl\u00faster reinicie sin problemas, planific\u00e1 reiniciarlo en o antes de la fecha indicada. Al reiniciar, el proceso podr\u00eda requerir que aprob\u00e9s manualmente los CSR pendientes para recuperar los certificados de kubelet.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>oc -n openshift-kube-apiserver-operator get secret kube-apiserver-to-kubelet-signer \\\n  -o jsonpath='{.metadata.annotations.auth\\.openshift\\.io\/certificate-not-after}'<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"709\" height=\"61\" src=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-553.png\" alt=\"\" class=\"wp-image-25229\" srcset=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-553.png 709w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-553-300x26.png 300w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">1. Marcar todos los nodos como no programables (cordon)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Esto evita que se programen pods nuevos mientras apag\u00e1s. Corr\u00e9:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>for node in $(oc get nodes -o jsonpath='{.items&#91;*].metadata.name}'); do\n  echo ${node}\n  oc adm cordon ${node}\ndone<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"291\" src=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-554-1024x291.png\" alt=\"\" class=\"wp-image-25230\" srcset=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-554-1024x291.png 1024w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-554-300x85.png 300w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-554-768x219.png 768w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-554.png 1293w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. Apagar todos los nodos<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Este comando le dice a cada nodo que se apague de forma ordenada (1 minuto de gracia para que los pods terminen bien):<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>for node in $(oc get nodes -o jsonpath='{.items&#91;*].metadata.name}'); do\n  oc debug node\/${node} -- chroot \/host shutdown -h 1\ndone<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Resultado<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>Starting pod\/compute1okdunaaccr-debug-frvx7 ...\nTo use host binaries, run `chroot \/host`. Instead, if you need to access host namespaces, run `nsenter -a -t 1`.\nShutdown scheduled for Mon 2026-06-29 21:36:00 UTC, use 'shutdown -c' to cancel.\n\nRemoving debug pod ...\nStarting pod\/compute2okdunaaccr-debug-vkb9z ...\nTo use host binaries, run `chroot \/host`. Instead, if you need to access host namespaces, run `nsenter -a -t 1`.\nShutdown scheduled for Mon 2026-06-29 15:36:02 CST, use 'shutdown -c' to cancel.\n\nRemoving debug pod ...\nStarting pod\/compute3okdunaaccr-debug-2cs2l ...\nTo use host binaries, run `chroot \/host`. Instead, if you need to access host namespaces, run `nsenter -a -t 1`.\nShutdown scheduled for Mon 2026-06-29 15:36:03 CST, use 'shutdown -c' to cancel.\n\nRemoving debug pod ...\nStarting pod\/cp1okdunaaccr-debug-ss825 ...\nTo use host binaries, run `chroot \/host`. Instead, if you need to access host namespaces, run `nsenter -a -t 1`.\nShutdown scheduled for Mon 2026-06-29 15:36:21 CST, use 'shutdown -c' to cancel.\n\nRemoving debug pod ...\nStarting pod\/cp2okdunaaccr-debug-g6xvf ...\nTo use host binaries, run `chroot \/host`. Instead, if you need to access host namespaces, run `nsenter -a -t 1`.\nShutdown scheduled for Mon 2026-06-29 15:36:22 CST, use 'shutdown -c' to cancel.\n\nRemoving debug pod ...\nStarting pod\/cp3okdunaaccr-debug-zb5v4 ...\nTo use host binaries, run `chroot \/host`. Instead, if you need to access host namespaces, run `nsenter -a -t 1`.\nShutdown scheduled for Mon 2026-06-29 15:36:23 CST, use 'shutdown -c' to cancel.\n\nRemoving debug pod ...\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"646\" src=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-555-1024x646.png\" alt=\"\" class=\"wp-image-25231\" srcset=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-555-1024x646.png 1024w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-555-300x189.png 300w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-555-768x484.png 768w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-555.png 1167w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-palette-color-8-color has-vivid-cyan-blue-background-color has-text-color has-background has-link-color wp-elements-3d9d48c1a1bcf6ef9766971dce50a8d3 wp-block-paragraph\">NOTA: como tu cl\u00faster es bare-metal, conviene saber cu\u00e1l control-plane tiene el API VIP para que sea el \u00faltimo en apagarse. Pero con <code>-h 1<\/code> los seis reciben la orden casi al mismo tiempo y se apagan en paralelo tras ese minuto, as\u00ed que en la pr\u00e1ctica con 6 nodos no suele dar problema.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"71\" src=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-556.png\" alt=\"\" class=\"wp-image-25232\" srcset=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-556.png 642w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-556-300x33.png 300w\" sizes=\"(max-width: 642px) 100vw, 642px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3. Verificar que los nodos ya se apagaron<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Esper\u00e1 1-2 minutos a que se cumpla el plazo, y confirm\u00e1 que est\u00e1n realmente abajo. Como el API se apaga junto con los masters, <code>oc<\/code> va a dejar de responder; podemos ejecutar<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>oc get nodes<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Resultado<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">E0629 15:38:46.565839 7700 memcache.go:265] \u00abUnhandled Error\u00bb err=\u00bbcouldn&#8217;t get current server API group list: Get \\\u00bbhttps:\/\/api.okd.una.ac.cr:6443\/api?timeout=32s\\\u00bb: EOF\u00bb<br>E0629 15:38:56.623750 7700 memcache.go:265] \u00abUnhandled Error\u00bb err=\u00bbcouldn&#8217;t get current server API group list: Get \\\u00bbhttps:\/\/api.okd.una.ac.cr:6443\/api?timeout=32s\\\u00bb: EOF\u00bb<br>E0629 15:39:06.689324 7700 memcache.go:265] \u00abUnhandled Error\u00bb err=\u00bbcouldn&#8217;t get current server API group list: Get \\\u00bbhttps:\/\/api.okd.una.ac.cr:6443\/api?timeout=32s\\\u00bb: EOF\u00bb<br>E0629 15:39:16.743920 7700 memcache.go:265] \u00abUnhandled Error\u00bb err=\u00bbcouldn&#8217;t get current server API group list: Get \\\u00bbhttps:\/\/api.okd.una.ac.cr:6443\/api?timeout=32s\\\u00bb: EOF\u00bb<br>E0629 15:39:26.811625 7700 memcache.go:265] \u00abUnhandled Error\u00bb err=\u00bbcouldn&#8217;t get current server API group list: Get \\\u00bbhttps:\/\/api.okd.una.ac.cr:6443\/api?timeout=32s\\\u00bb: EOF\u00bb<br>E0629 15:39:36.869042 7700 memcache.go:265] \u00abUnhandled Error\u00bb err=\u00bbcouldn&#8217;t get current server API group list: Get \\\u00bbhttps:\/\/api.okd.una.ac.cr:6443\/api?timeout=32s\\\u00bb: EOF\u00bb<br>Unable to connect to the server: EOF<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"116\" src=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-557-1024x116.png\" alt=\"\" class=\"wp-image-25233\" srcset=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-557-1024x116.png 1024w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-557-300x34.png 300w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-557-768x87.png 768w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-557-1536x173.png 1536w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-557.png 1771w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>O lo podemos confirmar con <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>for n in compute1 compute2 compute3 cp1 cp2 cp3; do\n  echo -n \"${n}: \"\n  ping -c1 -W1 ${n}.okd.una.ac.cr >\/dev\/null 2>&amp;1 &amp;&amp; echo \"ARRIBA\" || echo \"abajo\"\ndone<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"255\" src=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-558-1024x255.png\" alt=\"\" class=\"wp-image-25234\" srcset=\"https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-558-1024x255.png 1024w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-558-300x75.png 300w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-558-768x191.png 768w, https:\/\/sada.services\/wp-content\/uploads\/2026\/06\/image-558.png 1058w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Verificaciones previas 1. Marcar todos los nodos como no programables (cordon) 2. Apagar todos los nodos NOTA: como tu cl\u00faster es bare-metal, conviene saber cu\u00e1l control-plane tiene el API VIP para que sea el \u00faltimo en apagarse. Pero con -h 1 los seis reciben la orden casi al mismo tiempo y se apagan en paralelo [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25227","post","type-post","status-publish","format-standard","hentry","category-sin-categoria"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/25227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25227"}],"version-history":[{"count":1,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/25227\/revisions"}],"predecessor-version":[{"id":25235,"href":"https:\/\/sada.services\/index.php?rest_route=\/wp\/v2\/posts\/25227\/revisions\/25235"}],"wp:attachment":[{"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sada.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}