[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[],[],null,["# Deploy a Linux system container to a target cluster\n===================================================\n\nThis page describes how to prepare your cluster for deployment, and how to\ndeploy your Linux system container using Skaffold.\n| **Note:** Using Skaffold is the recommended approach, but is not required. You can also build directly with [`docker build`](https://docs.docker.com/build/) and apply the changes with [`kubectl`](https://kubernetes.io/docs/reference/kubectl/).\n\nAfter you have migrated a workload from your source platform, you can use the\ndeployment artifacts generated by that process to deploy the migrated workload\ncontainer to the cluster.\n\nSkaffold can handle the workflow for building, pushing, and deploying your\napplication.\n\nBefore you begin\n----------------\n\nBefore deploying your workload, you should have first:\n\n- [Migrated the workload](/migrate/containers/docs/migrating-linux-vm-overview) using Migrate to Containers.\n- [Reviewed the generate deployment files](/migrate/containers/docs/review-deployment-files).\n- Created the cluster where you want to deploy your workload. For more information, see:\n - [Creating a zonal cluster](/kubernetes-engine/docs/how-to/creating-a-zonal-cluster)\n - [Creating a regional cluster](/kubernetes-engine/docs/how-to/creating-a-regional-cluster)\n - [Creating an Autopilot cluster](/kubernetes-engine/docs/how-to/creating-an-autopilot-cluster)\n- [Set up `kubectl` and connected to the cluster](/kubernetes-engine/docs/how-to/cluster-access-for-kubectl).\n\nChoose and set up your Docker registry\n--------------------------------------\n\nAs part of your deployment, you build and upload the Docker image of your\ncontainer to a Docker registry.\n\nFor the Docker registry you can choose to use:\n\n- Artifact Registry\n\n- Any Docker registry that supports basic authentication\n\nThe recommended solution is to use [Artifact Registry](/artifact-registry)\nin the same project of the deployment cluster.\nGKE can access the registry by default.\nFor more information, see the [requirements to integrate with\nGKE](/artifact-registry/docs/integrate-gke#requirements).\n\nIf you want to use you a private Docker registry, learn\n[how to configure the registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/).\n\nDeploy your container with Skaffold\n-----------------------------------\n\nThe `skaffold.yaml` file is at the root folder of the generated artifacts.\nTo learn how to edit the `skaffold.yaml` file, see the\n[Skaffold file reference](https://skaffold.dev/docs/references/yaml/).\n\nTo build and deploy your container, from the root folder of the generated\nartifacts, run the following command: \n\n skaffold run -d \u003cvar translate=\"no\"\u003eREPOSITORY_PATH\u003c/var\u003e\n\nReplace \u003cvar translate=\"no\"\u003eREPOSITORY_PATH\u003c/var\u003e with the path to your artifact repository.\nFor example,\n`us-central1-docker.pkg.dev/`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/`\u003cvar translate=\"no\"\u003eREPOSITORY_NAME\u003c/var\u003e.\n\nThis command builds the image, uploads it to the selected repository,\nand then deploys it to the default cluster.\n\nTo run Skaffold while building using Cloud Build, use the\nfollowing command: \n\n skaffold run -d \u003cvar translate=\"no\"\u003eREPOSITORY_PATH\u003c/var\u003e -p cloudbuild\n\nWhat's next\n-----------\n\n- Learn how to [complete post-migration image updates](/migrate/containers/docs/post-migration-image-updates)."]]