[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-19 (世界標準時間)。"],[],[],null,["# Deploy a Linux application container\n====================================\n\nThis page describes how to prepare your cluster for deployment, and how to\ndeploy your Linux application containers 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\nSkaffold handles the workflow for building, pushing, and deploying your\napplication.\nLinux, Tomcat, WebSphere, JBoss, Apache, and WordPress support Skaffold\nartifact creation by default.\n\nIf you use Cloud Shell, Skaffold is already installed. If you need to install\nSkaffold, see [Installing Skaffold](https://skaffold.dev/docs/install/).\n\nBefore you begin\n----------------\n\n- Complete the migration and have the resulting generated artifacts.\n- Create 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 connect 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\nUse Skaffold with Linux-based workloads\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 [monitor migrated workloads](/migrate/containers/docs/monitoring-migrated-workloads)."]]