Envía una imagen de contenedor de un clúster a otro
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Los artefactos del sistema existen en Artifact Registry del clúster de administrador. Envía artefactos nuevos del sistema cuando este muestre errores o interrupciones que puedas corregir con parches de artefactos nuevos.
En este documento, se describe cómo enviar artefactos individuales de un clúster a otro.
Antes de comenzar
Para obtener los permisos que necesitas para acceder a los recursos en los proyectos del sistema de Artifact Registry como administrador, pídele a tu administrador de seguridad que te otorgue los siguientes roles según el clúster al que deseas enviar la imagen del contenedor:
Clúster de administrador de la organización: Para enviar la imagen del contenedor al Artifact Registry del sistema del clúster de administrador de la organización, necesitas el rol de administrador de Artifact Registry del sistema de la organización (organization-system-artifact-management-admin).
Clúster de administrador raíz: Para enviar la imagen del contenedor al Artifact Registry del sistema del clúster de administrador raíz, necesitas el rol de administrador de Artifact Registry del sistema (system-artifact-management-admin).
Después de obtener los permisos necesarios, sigue estos pasos antes de enviar una imagen al Artifact Registry del sistema del clúster de administrador raíz o del clúster de administrador de la organización:
Descarga una imagen de contenedor desde un bucket de S3
Para obtener los permisos que necesitas para descargar la imagen del contenedor del bucket de S3, pídele a tu administrador de seguridad que te otorgue el rol de Visualizador de objetos del bucket del proyecto (project-bucket-object-viewer) en el espacio de nombres del proyecto.
El administrador de seguridad te otorga acceso creando una vinculación de rol:
USER: Es el nombre de la cuenta del usuario que requiere la vinculación de rol.
PROJECT_NAMESPACE: Es el espacio de nombres del proyecto con el bucket de S3.
Obtienes acceso de solo lectura al bucket dentro del proyecto y a los objetos de ese bucket.
Después de obtener los permisos necesarios, sigue estos pasos para descargar la imagen del contenedor del bucket de S3 del espacio de nombres del proyecto:
Obtén el nombre secreto del bucket. El nombre del secreto se ve como el siguiente ejemplo:
object-storage-key-std-user-ID
El nombre del secreto incluye un valor ID único para acceder al bucket.
Copia el nombre secreto del bucket.
Obtén credenciales de acceso al bucket y configura la herramienta de CLI s3cmd.
Reemplaza SECRET_NAME por el valor que copiaste en el paso anterior.
Descarga la imagen del contenedor del bucket de S3 a tu estación de trabajo.
s3cmdgets3://BUCKET_NAME/g/CONTAINER_IMAGE_NAME
Reemplaza lo siguiente:
BUCKET_NAME: Es el nombre del bucket de S3 que contiene la imagen del contenedor.
CONTAINER_IMAGE_NAME: Es el nombre del archivo de imagen de contenedor que deseas descargar del bucket de S3.
Envía la imagen al registro de Artifact Registry del sistema
Sigue estos pasos para enviar el archivo de la imagen del contenedor que tienes en tu estación de trabajo al Artifact Registry del sistema en el clúster de administrador:
Abre la consola.
Obtén la ruta de acceso al extremo de Artifact Registry del sistema del clúster en el que deseas enviar la imagen de contenedor.
Reemplaza CONTAINER_IMAGE_PATH por la ruta de acceso al archivo de imagen del contenedor en tu sistema de archivos local. Un valor válido para esta ruta es, por ejemplo, oracle_db.tar.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eSystem artifacts are located in the Artifact Registry of the admin cluster, and new artifacts should be pushed when bug fixes or patches are needed.\u003c/p\u003e\n"],["\u003cp\u003ePushing container images to the system Artifact Registry requires specific administrator roles: \u003ccode\u003eorganization-system-artifact-management-admin\u003c/code\u003e for the org admin cluster and \u003ccode\u003esystem-artifact-management-admin\u003c/code\u003e for the root admin cluster.\u003c/p\u003e\n"],["\u003cp\u003eBefore pushing, users must install the Distributed Cloud CLI and its \u003ccode\u003edocker-credential-gdcloud\u003c/code\u003e component, sign in with the configured identity provider, export the kubeconfig file, and configure Docker.\u003c/p\u003e\n"],["\u003cp\u003eIf the container image is stored in an S3 bucket, users need the \u003ccode\u003eproject-bucket-object-viewer\u003c/code\u003e role, the bucket's secret name, and must use the \u003ccode\u003es3cmd\u003c/code\u003e CLI tool to download it before pushing.\u003c/p\u003e\n"],["\u003cp\u003eTo push a container image to the system Artifact Registry, users need to load the image, tag it with the registry endpoint, and then push it using Docker commands, replacing placeholders with appropriate values.\u003c/p\u003e\n"]]],[],null,["# Push a container image from one cluster to another\n\nSystem artifacts exist in the Artifact Registry of the admin cluster. Push new system artifacts when the\nsystem shows bugs or outages that you can fix by patching new artifacts.\n\nThis document describes how to push individual artifacts from one cluster to\nanother.\n\nBefore you begin\n----------------\n\nTo get the permissions that you need to access resources in system Artifact Registry projects as an administrator, ask your Security Admin to grant you the following roles depending on the cluster you want to push the container image to:\n\n- **Org admin cluster:** To push the container image to the system Artifact Registry of the org admin cluster, you need the Organization System Artifact Management Admin (`organization-system-artifact-management-admin`) role.\n- **Root admin cluster:** To push the container image to the system Artifact Registry of the root admin cluster, you need the System Artifact Management Admin (`system-artifact-management-admin`) role.\n\nAfter obtaining the necessary permissions, work through the following steps before pushing an image to the system Artifact Registry of the root admin cluster or org admin cluster:\n\n1. Download and install the Distributed Cloud CLI following the instructions of [gdcloud command-line interface (CLI)](/distributed-cloud/hosted/docs/latest/appliance/resources/gdcloud-overview).\n\n2. Install the `docker-credential-gdcloud` component following the instructions of [Install components](/distributed-cloud/hosted/docs/latest/appliance/resources/gdcloud-install#install-components).\n\n gdcloud components install docker-credential-gdcloud\n\n3. [Sign in with the configured identity provider](/distributed-cloud/hosted/docs/latest/appliance/resources/gdcloud-auth).\n\n gdcloud auth login\n\n4. Export the kubeconfig file.\n\n gdcloud clusters get-credentials \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e with the name of the cluster.\n5. Configure Docker.\n\n gdcloud auth configure-docker\n\nDownload a container image from an S3 bucket\n--------------------------------------------\n\n| **Note:** Refer to this section if the container image to upload is stored in a Simple Storage Service (S3) bucket. Otherwise, if the container image is in your workstation, you can skip to [Push the image to the system Artifact Registry](#push-the-image-to-the-registry).\n\nTo get the permissions that you need to download the container image from the S3\nbucket, ask your Security Admin to grant you the Project Bucket Object Viewer\n(`project-bucket-object-viewer`) role in the project's namespace.\n\nThe Security Admin grants you access by creating a role binding: \n\n kubectl create rolebinding \u003cvar translate=\"no\"\u003eIO_USER\u003c/var\u003e-bor-rb \\\n --role=project-bucket-object-viewer \\\n --user=\u003cvar translate=\"no\"\u003eUSER\u003c/var\u003e \\\n -n \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eUSER\u003c/var\u003e: The account name of the user that requires the role binding.\n- \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e: The project's namespace with the S3 bucket.\n\nYou get read-only access on the bucket within the project and the objects in that bucket.\n\nAfter obtaining the necessary permissions, work through the following steps to download the container image from the S3 bucket of the project's namespace:\n\n1. Obtain the secret name of the bucket. The secret name looks like the following example:\n\n object-storage-key-std-user-\u003cvar translate=\"no\"\u003eID\u003c/var\u003e\n\n The secret name includes a unique \u003cvar translate=\"no\"\u003eID\u003c/var\u003e value to access the bucket.\n2. Copy the secret name of the bucket.\n\n3. Get bucket access credentials and configure the s3cmd CLI tool.\n\n SECRET_NAME=\u003cvar translate=\"no\"\u003eSECRET_NAME\u003c/var\u003e\n ACCESS_KEY=$(kubectl get secret ${SECRET_NAME} -n object-storage-access-keys -o=jsonpath='{.data.access-key-id}' | base64 -d)\n SECRET_KEY=$(kubectl get secret ${SECRET_NAME} -n object-storage-access-keys -o=jsonpath='{.data.secret-access-key}' | base64 -d)\n S3_ENDPOINT=objectstorage.$(kubectl get configmap dnssuffix -n gpc-system -o jsonpath='{.data.dnsSuffix}')\n\n echo \"Access Key: ${ACCESS_KEY}\" \\\n && echo \"Secret Key: ${SECRET_KEY}\" \\\n && echo \"S3 Endpoint: ${S3_ENDPOINT}\"\n\n s3cmd --configure\n\n Replace \u003cvar translate=\"no\"\u003eSECRET_NAME\u003c/var\u003e with the value you copied on the previous step.\n4. Download the container image from the S3 bucket to your workstation.\n\n s3cmd get s3://\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e /g/\u003cvar translate=\"no\"\u003eCONTAINER_IMAGE_NAME\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e: The name of the S3 bucket that has the container image.\n - \u003cvar translate=\"no\"\u003eCONTAINER_IMAGE_NAME\u003c/var\u003e: The name of the container image file that you want to download from the S3 bucket.\n\nPush the image to the system Artifact Registry\n----------------------------------------------\n\nFollow these steps to push the file of the container image that you have in your workstation to the system Artifact Registry in the admin cluster:\n\n1. Open the console.\n\n2. Get the path to the system Artifact Registry endpoint of the cluster where you want to push the container image.\n\n export REGISTRY_ENDPOINT=harbor.$(kubectl get configmap dnssuffix -n gpc-system -o jsonpath='{.data.dnsSuffix}')\n\n3. Load, tag, and push the container image to the system Artifact Registry endpoint of the cluster.\n\n docker load --input \u003cvar translate=\"no\"\u003eCONTAINER_IMAGE_PATH\u003c/var\u003e\n\n docker tag \u003cvar translate=\"no\"\u003eCONTAINER_IMAGE_PATH\u003c/var\u003e ${REGISTRY_ENDPOINT}/\u003cvar translate=\"no\"\u003eCONTAINER_IMAGE_PATH\u003c/var\u003e\n\n docker push ${REGISTRY_ENDPOINT}/\u003cvar translate=\"no\"\u003eCONTAINER_IMAGE_PATH\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eCONTAINER_IMAGE_PATH\u003c/var\u003e with the path of the container image file in your local file system. A valid value for this path is, for example, `oracle_db.tar`."]]