本頁面提供 Google Kubernetes Engine (GKE) 標準模式中 Windows Server 容器的總覽。如要瞭解如何建立叢集,請參閱使用 Windows Server 節點集區建立叢集。GKE Autopilot 模式不支援 Windows Server 節點映像檔和容器。
總覽
在 GKE 中使用 Windows Server 容器,可享有 Kubernetes 的優點:靈活度高、部署速度快,且 Windows Server 應用程式的管理作業更簡化。您可以在同一個叢集中並行執行 Windows Server 和 Linux 容器,這樣就能透過中央管理平台管理這兩個容器平台。目前不支援 Microsoft Hyper-V 容器。
節點映像檔
您可以使用 Windows Server 半年通道 (SAC) 或 Windows Server 長期維護通道 (LTSC),建構 Windows Server 容器節點映像檔。單一叢集可以有多個使用不同 Windows Server 版本的 Windows Server 節點集區,但每個節點集區只能使用一個 Windows Server 版本。如要進一步瞭解這些版本之間的差異,請參閱「選擇 Windows Server 節點映像檔」。
儲存空間
Windows Server 容器可運用 GKE 提供的許多儲存空間選項。如需在 Windows 中使用 GKE 儲存空間選項的範例,請參閱「本機 SSD」。
使用 Windows Server 容器時,您必須建立 StorageClass 物件,並在 PersistentVolumeClaim 物件的 storageClassName 欄位中指定該物件的名稱,因為 Windows 不支援 ext4 檔案儲存類型。如果您使用 Compute Engine 永久磁碟,檔案儲存類型必須為 NTFS。
與 Linux 容器一樣,Windows 容器提供程序和資源隔離界線。Windows Server 容器可用於企業多租戶。不過,由於 Microsoft「無意提供服務」來解決 Windows 容器逸出漏洞,因此不建議在惡意「多租戶」情境或需要不同風險等級的情境中使用 Windows 節點。請改為為每個應用程式或開發團隊提供個別的叢集和專案,以達到隔離效果。 Google Cloud
功能限制
Windows Server 容器目前不支援部分 Kubernetes 功能。此外,部分功能僅適用於 Linux,不適用於 Windows。如需 Kubernetes 支援和不支援功能的完整清單,請參閱 Kubernetes 說明文件。
翻新應用程式時,您也會希望將其納入端對端 DevOps 管理體驗,與現有工具和工作流程搭配使用。為此,Google 與多個合作夥伴攜手合作,確保您的建構、測試、部署、設定和監控應用程式能與 Windows 容器順利搭配運作。以下列舉我們測試過的部分用途和合作夥伴解決方案,可支援 GKE 中的 Windows 容器:
[[["容易理解","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-09-04 (世界標準時間)。"],[],[],null,["# Windows Server containers on GKE\n\n[Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\n| **Warning:** Windows Server Semi-Annual Channel (SAC) images aren't supported after August 9, 2022 because Microsoft is removing support for the SAC. For potential impact and migration instructions, refer to [Windows Server Semi-Annual Channel end of servicing](/kubernetes-engine/docs/deprecations/windows-server-sac).\n\nThis page provides an overview of Windows Server containers in\nGoogle Kubernetes Engine (GKE) Standard mode. To learn how to create a cluster, see\n[Creating a cluster using Windows Server node pools](/kubernetes-engine/docs/how-to/creating-a-cluster-windows). Windows Server node images and containers aren't available in GKE Autopilot mode.\n\nOverview\n--------\n\nUsing Windows Server containers on GKE enables you to take\nadvantage of the benefits of Kubernetes: agility, speed of deployment and\nsimplified management of your Windows Server applications. You can run\nyour Windows Server and Linux containers side by side in the same cluster,\nwhich allows for a central management plane for both container platforms.\nMicrosoft Hyper-V containers are not currently supported.\n\nNode images\n-----------\n\nYou can build your Windows Server container\n[node images](/kubernetes-engine/docs/concepts/node-images) using Windows Server\nSemi-Annual Channel (SAC) or Windows Server Long-Term Servicing Channel (LTSC).\nA single cluster can have multiple Windows Server node pools using different Windows\nServer versions, but each individual node pool can only use one Windows Server\nversion. To learn more about the differences between these versions, see\n[Choosing your Windows Server node images](/kubernetes-engine/docs/how-to/creating-a-cluster-windows#choose_your_windows_server_node_image).\n\nStorage\n-------\n\nYour Windows Server containers can take advantage of many of the storage\noptions that GKE provides. For an example of using\nGKE storage options with Windows, see\n[Local SSDs](/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd).\n\nWhen working with Windows Server containers, you must create a `StorageClass`\nobject, and specify the name of that object in the `storageClassName` field of\nthe `PersistentVolumeClaim` object because the `ext4` file storage type is not\nsupported with Windows. If you are using a Compute Engine persistent disk, you\nmust use NTFS as the file storage type.\n\nThe Compute Engine persistent disk CSI Driver is also available for Windows Server containers.\nFor more details, see [Using the Compute Engine persistent disk CSI Driver](/kubernetes-engine/docs/how-to/persistent-volumes/gce-pd-csi-driver).\n\nSecurity\n--------\n\nLike Linux containers, Windows containers provide a process and resource\nisolation boundary. Windows Server containers can be used for\n[enterprise multi-tenancy](/kubernetes-engine/docs/concepts/multitenancy-overview#enterprise_multi-tenancy).\nHowever, because Microsoft does not [intend to service](https://www.microsoft.com/en-us/msrc/windows-security-servicing-criteria)\nWindows container escape vulnerabilities, the use of Windows nodes is not\nrecommended in hostile [multi-tenancy](/kubernetes-engine/docs/concepts/multitenancy-overview)\nscenarios or those where differing risk levels are needed. Instead, give each\napplication or development team a separate cluster and Google Cloud\nproject to achieve isolation.\n\nFeature limitations\n-------------------\n\nThere are some Kubernetes features that are not yet supported for\nWindows Server containers. In addition, some features are Linux-specific and do not\nwork for Windows. For the complete list of supported and unsupported Kubernetes features,\nsee the [Kubernetes documentation](https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/#supported-functionality-and-limitations).\n\nIn addition to the unsupported Kubernetes features, there are some GKE\nfeatures that are not supported.\n\nFor GKE clusters, the following features are not supported with\nWindows Server node pools:\n\n- [Cloud TPUs](/tpu/docs/tpus) (`--enable-tpu`)\n- [Image streaming](/kubernetes-engine/docs/how-to/image-streaming)\n- [Intranode visibility](/kubernetes-engine/docs/how-to/intranode-visibility) (`--enable-intra-node-visibility`)\n- [IP masquerade agent](/kubernetes-engine/docs/how-to/ip-masquerade-agent)\n- [Kubernetes alpha cluster](/kubernetes-engine/docs/concepts/alpha-clusters) (`--enable-kubernetes-alpha`)\n- [Node Local DNS cache](/kubernetes-engine/docs/how-to/nodelocal-dns-cache)\n- [Private use of Class E IP addresses](/kubernetes-engine/docs/how-to/alias-ips#enable_reserved_ip_ranges)\n- [Private use of public IP addresses](/kubernetes-engine/docs/how-to/alias-ips#enable_pupis)\n- [Network policy logging](/kubernetes-engine/docs/how-to/network-policy-logging)\n- [Kubernetes `service.spec.sessionAffinity`](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies)\n- [GPUs](/compute/docs/gpus) (`--accelerator`)\n- [Setting the maximum Pods per node greater than the default limit of 110](/kubernetes-engine/docs/how-to/flexible-pod-cidr)\n- [Filestore CSI driver](/kubernetes-engine/docs/how-to/persistent-volumes/filestore-csi-driver)\n- Docker-based [CloudSQL Auth proxy](/sql/docs/mysql/sql-proxy)\n- [IPv4/IPv6 dual-stack networking](/kubernetes-engine/docs/concepts/alias-ips#dual_stack_network) IPv6 is not supported on Windows nodes.\n\n[Local External Traffic Policy](/kubernetes-engine/docs/how-to/service-parameters#externalTrafficPolicy)\non Windows node pool is only supported with GKE\nversion v1.23.4-gke.400 or later.\n\nOther Google Cloud products that you want to use with GKE clusters\nmight not support Windows Server node pools. For specific limitations, refer to\nthe documentation of that product.\n\nResources\n---------\n\nThe following sections provide links to relevant resources for Windows Server\ncontainers on GKE.\n\n### Discover\n\nReview these resources to discover information about Windows on GKE:\n\n- Read the [Run Windows Server containers on GKE](/blog/products/containers-kubernetes/run-windows-server-containers-on-gke) blog.\n- Read the [Windows Server containers on GKE now GA](/blog/products/containers-kubernetes/windows-server-containers-on-gke-now-ga) blog.\n- Read the [Windows Server support comes to Google Distributed Cloud](/blog/topics/anthos/windows-server-support-comes-to-anthos-on-prem) blog.\n- Read the [Migrating Legacy OSes to Google Cloud](/resources/forrester-cost-savings-of-migrating-os-to-cloud-tei-study) case study.\n\n### Get started\n\nConsider these resources for getting started:\n\n- Watch the [How to modernize and run Windows apps in GKE Enterprise GKE](https://www.youtube.com/watch?v=w6tzIjZhTIk) video.\n- Watch the [Migrate, Manage \\& Modernize: Windows Workloads Powered by GKE and GKE Enterprise](https://cloudonair.withgoogle.com/events/gke-anthos) webinar.\n- Try out the [New Microsoft and Windows on Google Cloud Demo Center](/blog/topics/windows/new-microsoft-and-windows-on-google-cloud-demo-center) demos.\n- Learn how to [Create a cluster using Windows Server node pools](/kubernetes-engine/docs/how-to/creating-a-cluster-windows).\n\n### Create \\& deploy\n\nFor guidance on creating and deploying your applications, see these pages:\n\n- [Deploying a Windows Server application](/kubernetes-engine/docs/how-to/deploying-windows-app)\n- [Deploying a stateful application](/kubernetes-engine/docs/how-to/stateful-apps)\n- [Building Windows Server multi-arch images](/kubernetes-engine/docs/tutorials/building-windows-multi-arch-images)\n- [Using the Compute Engine persistent disk CSI Driver](/kubernetes-engine/docs/how-to/persistent-volumes/gce-pd-csi-driver#using_the_for_windows_clusters)\n\n### Integrate with Active Directory\n\nFor guidance on Active Directory integration, see these pages:\n\n- [Best practices for running Active Directory on Google Cloud](/compute/docs/instances/windows/best-practices)\n- [Configure Windows Server nodes to automatically join an Active Directory domain](/kubernetes-engine/docs/how-to/auto-join-windows-nodepools)\n- [Deploy ASP.NET apps with Windows Authentication in GKE Windows containers](/kubernetes-engine/docs/how-to/deploying-aspnet-with-windows-authentication-in-gke-windows-containers)\n\n### Troubleshoot\n\nFor help with troubleshooting, see [Collecting diagnostic information](/compute/docs/instances/collecting-diagnostic-information).\n\n### Explore\n\nTo explore and learn about using GKE Enterprise for Windows, see these resources:\n\n- Learn about [Migrate to Containers](/migrate/containers/docs) for migrating Windows workloads.\n- Learn about using Windows node pools in [Google Distributed Cloud](/anthos/clusters/docs/on-prem/1.8/how-to/user-guide-for-windows-server-os-node-pools).\n\n### Partner solutions\n\nWhen you modernize your applications, you also want to incorporate them into an\nend-to-end DevOps management experience that works with your existing tooling\nand workflows. To that end, Google has worked with several partners to make sure\nthat your build, test, deploy, config and monitoring applications work well with\nWindows containers. Here are some use cases and partner solutions that we've\ntested to support Windows containers in GKE:"]]