다음 페이지에서는 중첩된 가상화를 지원하는 노드를 사용하여 Google Kubernetes Engine(GKE) Standard 클러스터를 만드는 방법을 설명합니다.
Compute Engine VM은 Intel VT-x 명령어를 지원하므로, GKE 노드의 기본 VM 위에서 중첩된 VM을 실행할 수 있습니다.
그런 다음 QEMU와 같은 도구를 사용하는 포드를 배포하여 중첩된 VM을 만들 수 있습니다. 중첩된 VM을 사용하여 Android Emulator와 같은 특수한 워크로드 또는 VM을 격리 경계로 활용하는 워크로드를 실행할 수 있습니다.
성능 영향 감소
비중첩 가상화 구성과 달리 하드웨어 보조 중첩 가상화를 사용할 경우 중첩된 VM에서 실행되는 워크로드에서 성능 감소가 발생할 수 있습니다. 성능 영향의 정도는 I/O 및 메모리 사용 특성을 포함하여 특정 워크로드 프로필에 따라 달라집니다.
또한 GKE 노드의 기본 VM에서 중첩된 VM을 만들면 이러한 노드에서 실행되는 다른 워크로드의 성능에 영향을 줄 수 있습니다.
[[["이해하기 쉬움","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-06-18(UTC)"],[],[],null,["# Use nested VMs with GKE Standard clusters\n\n[Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThe following page explains how you can create Google Kubernetes Engine (GKE)\nStandard clusters with nodes that support [nested\nvirtualization](/compute/docs/instances/nested-virtualization/overview#restrictions).\nCompute Engine VMs use [Intel\nVT-x](https://www.intel.com/content/dam/www/central-libraries/us/en/documents/intel-virtualization-technologies-white-paper.pdf)\ninstructions so that nested VMs can run on a [GKE node's\nunderlying VM](/kubernetes-engine/docs/concepts/cluster-architecture#nodes).\nThen, you can deploy Pods that use tools such as [QEMU](https://www.qemu.org/)\nto create nested VMs. You can use nested VMs to run specialized workloads such\nas Android emulators, or workloads that benefit from the VM as an isolation\nboundary.\n\nReduced performance implications\n--------------------------------\n\nWith hardware-assisted nested virtualization, workloads running on the nested\nVMs might experience [reduced\nperformance](/compute/docs/instances/nested-virtualization/overview#performance_considerations)\nwhen compared to non-nested virtualization configurations. The amount of\nperformance impact will depend on the specific workload profile, including its\nI/O and memory usage characteristics.\n\nAdditionally, creating nested VMs on the GKE nodes' underlying\nVMs might affect the performance of other workloads running on those nodes.\n\nBefore you begin\n----------------\n\nBefore you start, make sure that you have performed the following tasks:\n\n- Enable the Google Kubernetes Engine API.\n[Enable Google Kubernetes Engine API](https://console.cloud.google.com/flows/enableapi?apiid=container.googleapis.com)\n- If you want to use the Google Cloud CLI for this task, [install](/sdk/docs/install) and then [initialize](/sdk/docs/initializing) the gcloud CLI. If you previously installed the gcloud CLI, get the latest version by running `gcloud components update`. **Note:** For existing gcloud CLI installations, make sure to set the `compute/region` [property](/sdk/docs/properties#setting_properties). If you use primarily zonal clusters, set the `compute/zone` instead. By setting a default location, you can avoid errors in the gcloud CLI like the following: `One of [--zone, --region] must be supplied: Please specify location`. You might need to specify the location in certain commands if the location of your cluster differs from the default that you set.\n\n\u003c!-- --\u003e\n\n- [Ensure that your organization policy supports creating nested VMs](/compute/docs/instances/nested-virtualization/managing-constraint#check_whether_nested_virtualization_is_allowed).\n- Review the nested VM [restrictions](/compute/docs/instances/nested-virtualization/overview#restrictions).\n\n### Requirements and limitations\n\nConsider the following information before enabling nested virtualization with\nGKE and allowing your Pods to create nested VMs:\n\n- You can only configure node pools with nested VMs with a limited number of VM machine series. See the **Nested virtualization** row of the [Machine\n series comparison](/compute/docs/machine-resource#machine_type_comparison) to confirm supported machine series.\n- You must use the `UBUNTU_CONTAINERD` image type, or the `COS_CONTAINERD`image type with nodes running version 1.28.4-gke.1083000 or later.\n- You can only use nested virtualization with Standard clusters, not Autopilot clusters.\n- You can't use [node\n auto-provisioning](/kubernetes-engine/docs/concepts/node-auto-provisioning) with nested virtualization-enabled node pools.\n- You can't use nested virtualization if the [*Disable VM nested virtualization*\n constraint](/compute/docs/instances/nested-virtualization/managing-constraint#console) is enforced for your organization policy.\n- You must set `securityContext.privileged:true` for Pods to interact with nested VMs.\n\nEnable nested virtualization\n----------------------------\n\nYou can enable nested virtualization when you create a cluster---by enabling it\nfor the default node pool---or when you create a node pool. You can't enable or\ndisable the feature for an existing node pool.\n\nThe instructions in the following sections create node pools with nodes with the\nlabel `nested-virtualization=enabled`. After GKE creates the\nnodes, you can schedule Pods that created nested VMs on the node's underlying\nVM.\n\n### Enable nested virtualization with a new Standard cluster\n\nCreate a new Standard cluster with nested virtualization enabled for\nthe default node pool. GKE only creates the default node pool\nwith nested virtualization enabled. GKE doesn't automatically\nenable the feature for all new node pools created for the cluster: \n\n gcloud container clusters create \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \\\n --enable-nested-virtualization \\\n --node-labels=nested-virtualization=enabled \\\n --machine-type=\u003cvar translate=\"no\"\u003eMACHINE_TYPE\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: The name of the cluster.\n- \u003cvar translate=\"no\"\u003eMACHINE_TYPE\u003c/var\u003e: A [supported machine type (see the\n **Nested virtualization row**)](/compute/docs/machine-resource#machine_type_comparison).\n\nOptionally, [check that nested virtualization is\nenabled](/compute/docs/instances/nested-virtualization/enabling#confirm_that_nested_virtualization_is_enabled_on_the_vm)\nfor a node in the node pool.\n\nYou can now [schedule Pods](#schedule-pod) that create nested VMs on the\nunderlying VM of the node.\n\n### Enable nested virtualization with a new node pool\n\nCreate a new node pool with nested virtualization enabled for an existing\nStandard cluster: \n\n gcloud container node-pools create \u003cvar translate=\"no\"\u003eNODEPOOL_NAME\u003c/var\u003e \\\n --enable-nested-virtualization \\\n --node-labels=nested-virtualization=enabled \\\n --cluster=\u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \\\n --machine-type=\u003cvar translate=\"no\"\u003eMACHINE_TYPE\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eNODEPOOL_NAME\u003c/var\u003e: The name of the node pool where nested virtualization is enabled.\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: The name of the cluster.\n- \u003cvar translate=\"no\"\u003eMACHINE_TYPE\u003c/var\u003e: A [support machine type (see the\n **Nested virtualization row**)](/compute/docs/machine-resource#machine_type_comparison).\n\nOptionally, [check that nested virtualization is\nenabled](/compute/docs/instances/nested-virtualization/enabling#confirm_that_nested_virtualization_is_enabled_on_the_vm)\nfor a node in the node pool.\n\nYou can now [schedule Pods](#schedule-pod) that create nested VMs on the\nunderlying VM of the node.\n\nSchedule a Pod to a node that supports nested virtualization\n------------------------------------------------------------\n\nTo schedule a Pod on a node with nested virtualization enabled, add the\nfollowing node selector to the specification: \n\n nodeSelector:\n nested-virtualization: enabled\n\nAdditionally, for the Pod to connect with a nested VM, you must set the Pod as\nprivileged by configuring `securityContext.privileged:true`.\n\nWhat's next\n-----------\n\n- [About nested virtualization](/compute/docs/instances/nested-virtualization/overview)"]]