本页面简要介绍了 Google Kubernetes Engine (GKE) Standard 模式中的 Windows Server 容器。如需了解如何创建集群,请参阅使用 Windows Server 节点池创建集群。Windows Server 节点映像和容器在 GKE Autopilot 模式下不可用。
概览
在 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 提供的许多存储选项。如需查看将 GKE 存储选项与 Windows 搭配使用的示例,请参阅本地 SSD。
使用 Windows Server 容器时,您必须创建一个 StorageClass 对象,并在 PersistentVolumeClaim 对象的 storageClassName 字段中指定该对象的名称,因为 Windows 不支持 ext4 文件存储类型。如果您使用的是 Compute Engine 永久性磁盘,则必须使用 NTFS 作为文件存储类型。
与 Linux 容器一样,Windows 容器也提供进程和资源的隔离边界。Windows Server 容器可用于企业多租户。但是,由于 Microsoft 不打算提供 Windows 容器逃逸漏洞服务,因此不建议在恶意多租户环境中或需要采用不同风险等级的情况下使用 Windows 节点。在这些情况下,应为每个应用或开发团队提供单独的集群和 Google Cloud项目以实现隔离。
功能限制
某些 Kubernetes 功能尚不受 Windows Server 容器支持。此外,某些功能是专门针对 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"]],["最后更新时间 (UTC):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:"]]