GKE Windows Server 노드를 관리형 Microsoft AD 도메인에 자동으로 조인
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에서는 자동화된 도메인 조인 기능을 사용하여 Google Kubernetes Engine(GKE) 클러스터의 Windows Server 노드를 관리형 Microsoft AD 도메인에 조인하는 방법을 설명합니다.
관리형 Microsoft AD가 Windows Server 노드를 도메인에 자동으로 조인하는 방법
GKE 클러스터에서 노드 풀을 만들 때 관리형 Microsoft AD에서 제공하는 바로 활용할 수 있는 스크립트를 사용하여 관리형 Microsoft AD 도메인에 자동으로 조인합니다. GKE가 노드 풀을 만든 후 관리형 Microsoft AD는 도메인 조인 요청을 시작하고 노드를 도메인에 조인하려고 시도합니다. 도메인 조인 요청이 성공하면 관리형 Microsoft AD가 노드를 도메인에 조인합니다. 도메인 조인 요청이 실패하면 생성된 노드가 계속 실행됩니다. 노드 풀을 다시 만들기 전에 로그를 확인하여 문제를 식별하고 해결해야 합니다. 자세한 내용은 디버그 로그 보기를 참고하세요.
일부 특정 시나리오에서는 관리형 Microsoft AD에서 조인되지 않은 노드에 관한 정보를 수동으로 정리해야 합니다. 자세한 내용은 조인되지 않은 VM 삭제를 참고하세요.
도메인 조인 스크립트를 사용하여 기존 노드 풀을 업데이트하여 기존 노드를 도메인에 자동으로 조인할 수는 없습니다.
자동화된 도메인 조인 기능은 인증을 위해 gMSA로 실행되도록 GKE 노드를 구성하지 않습니다. 그러나 관리형 Microsoft AD에서 수동으로 gMSA를 만들고 gMSA를 사용하도록 GKE 노드를 구성할 수 있습니다. GKE 노드의 gMSA 구성에 대한 자세한 내용은 Windows 포드 및 컨테이너에 대해 gMSA 구성을 참조하세요.
관리형 Microsoft AD 도메인과 노드 네트워크 간에 도메인 피어링을 구성하거나 관리형 Microsoft AD 도메인과 노드를 모두 동일한 네트워크에 배치합니다.
관리형 Microsoft AD 도메인이 있는 프로젝트에서 Google Cloud 관리형 ID 도메인 조인(roles/managedidentities.domainJoin) IAM 역할을 사용하여 서비스 계정을 만듭니다. 자세한 내용은 Cloud 관리형 ID 역할을 참조하세요.
Windows Server 노드의 컴퓨터 계정이 관리형 Microsoft AD에 이미 있는 경우 도메인 조인 요청이 실패합니다. 관리형 Microsoft AD가 도메인 조인 프로세스 중에 기존 컴퓨터 계정을 재사용하려면 노드 풀을 만들 때managed-ad-force 메타데이터 키를 사용하면 됩니다.
Windows Server 노드 조인
GKE 클러스터에 Windows Server 노드 풀을 추가할 때 이러한 메타데이터 키를 구성할 수 있습니다. 이 섹션에서는 노드 풀을 만들 때 gcloud CLI 명령어에서 이러한 메타데이터 키를 사용하는 방법을 보여줍니다.
그러나 다른 사용 가능한 옵션을 사용하여 노드 풀을 만들 때 이러한 메타데이터 키를 사용할 수 있습니다. 자세한 내용은 노드 풀 추가 및 관리를 참조하세요.
노드 풀을 만들고 Windows Server 노드에 참여하려면 다음 gcloud CLI 명령어를 실행합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(UTC)"],[],[],null,["# Join GKE Windows Server nodes automatically to a Managed Microsoft AD domain\n\nThis page explains how to join Windows Server nodes in your\nGoogle Kubernetes Engine (GKE) cluster to a Managed Microsoft AD domain using\nthe [automated domain join](/managed-microsoft-ad/docs/seamless-domain-join-gce)\nfeature.\n\nHow Managed Microsoft AD joins Windows Server nodes automatically to a domain\n-----------------------------------------------------------------------------\n\nWhen you create a [node pool](/kubernetes-engine/docs/concepts/node-pools) in\nyour [GKE\ncluster](/kubernetes-engine/docs/concepts/cluster-architecture), you can use the\nready-made scripts that are available from Managed Microsoft AD to\nautomatically join your Managed Microsoft AD domain. After\nGKE creates the node pool, Managed Microsoft AD\ninitiates the domain join request and attempts to join the nodes with your\ndomain. If the domain join request succeeds, Managed Microsoft AD\njoins the nodes to your domain. If the domain join request fails, the created\nnodes continue to run. You need to check the logs to identify and fix the issue\nbefore creating the node pool again. For more information, see [View debug\nlogs](/managed-microsoft-ad/docs/seamless-domain-join-gce#view-logs).\n\nYou need to clean up the information about unjoined nodes manually from\nManaged Microsoft AD in some specific scenarios. For more information, see\n[Clean up unjoined\nVMs](/managed-microsoft-ad/docs/seamless-domain-join-gce#cleanup-vm).\n\nYou can't update an existing node pool with the domain join scripts to\nautomatically join the existing nodes to your domain.\n\nThe automated domain join feature doesn't configure the GKE\nnodes to run with\n[gMSA](https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/manage-serviceaccounts)\nfor authentication. However, you can manually [create a\ngMSA](/managed-microsoft-ad/docs/create-gmsa) in Managed Microsoft AD and\nconfigure the GKE nodes to use the gMSA. For information\nabout configuring gMSA for the GKE nodes, see [Configure\ngMSA for Windows Pods and\ncontainers](https://kubernetes.io/docs/tasks/configure-pod-container/configure-gmsa/).\n\nBefore you begin\n----------------\n\n1. [Create a Managed Microsoft AD\n domain](/managed-microsoft-ad/docs/create-domain).\n\n2. [Create a GKE cluster using Windows Server node\n pools](/kubernetes-engine/docs/how-to/creating-a-cluster-windows).\n\n3. Make sure that the Windows Server nodes run on a [Windows version that\n Managed Microsoft AD\n supports](/managed-microsoft-ad/docs/os-versions#windows-domain-join).\n\n4. [Configure domain\n peering](/managed-microsoft-ad/docs/quickstart-domain-peering) between the\n Managed Microsoft AD domain and the nodes' network, or have both the\n Managed Microsoft AD domain and the nodes in the same network.\n\n5. Create a service account with the Google Cloud Managed Identities Domain\n Join (`roles/managedidentities.domainJoin`) IAM role on the\n project that has the Managed Microsoft AD domain. For more information,\n see [Cloud Managed Identities\n roles](/iam/docs/understanding-roles#cloud-managed-identities-roles).\n\n - For more information about granting roles, see [Grant a single\n role](/iam/docs/manage-access-service-accounts#grant-single-role).\n\n - For information about creating a service account, see [Authenticate\n workloads using service\n accounts](/compute/docs/access/create-enable-service-accounts-for-instances).\n\n6. Set the full `cloud-platform` access scope on the Windows Server nodes. For\n more information, see\n [Authorization](/compute/docs/access/service-accounts#authorization).\n\nMetadata\n--------\n\nYou need the following metadata keys to join your Windows Server nodes to a\ndomain.\n\n- `windows-startup-script-url`\n- `managed-ad-domain`\n- Optional: `enable-guest-attributes`\n- Optional: `managed-ad-ou-name`\n- Optional: `managed-ad-force`\n\nFor more information about these metadata keys, see\n[Metadata](/managed-microsoft-ad/docs/seamless-domain-join-gce#metadata).\n\nThe domain join request fails when the computer account of a Windows Server node\nalready exists in Managed Microsoft AD. For Managed Microsoft AD to\nreuse the existing computer account during the domain join process, you can use\nthe `managed-ad-force` metadata key when you [create the node\npool](/kubernetes-engine/docs/how-to/node-pools#add).\n\nJoin Windows Server nodes\n-------------------------\n\nYou can configure these [metadata\nkeys](/managed-microsoft-ad/docs/automated-domain-join-gke#metadata) when you\nadd a Windows Server node pool to your GKE cluster. This\nsection illustrates how to use these metadata keys in gcloud CLI\ncommands when you create a node pool.\n\nHowever, you can use these metadata keys when you create a node pool using the\nother available options as well. For more information, see [Add and manage node\npools](/kubernetes-engine/docs/how-to/node-pools).\n\nTo create a node pool and join the Windows Server nodes, run the following\ngcloud CLI command: \n\n```\ngcloud container node-pools create NODE_POOL_NAME \\\n --cluster=CLUSTER_NAME \\\n \"--metadata=windows-startup-script-url=URL,managed-ad-domain=DOMAIN_RESOURCE_PATH,managed-ad-force=TRUE\" \\\n --service-account=SERVICE_ACCOUNT \\\n --image-type=WINDOWS_IMAGE_NAME \\\n --scopes=https://www.googleapis.com/auth/cloud-platform \\\n --location=ZONE_OR_REGION \\\n --no-enable-autoupgrade\n```\n\nYou can replace the placeholders in the `--metadata` flag with relevant values\nas described in the\n[metadata](/managed-microsoft-ad/docs/seamless-domain-join-gce#metadata)\nsection.\n\nFor more information about this gcloud CLI command, see [gcloud\ncontainer node-pools create](/sdk/gcloud/reference/container/node-pools/create).\n\nWhat's next\n-----------\n\n- [Join a Windows VM automatically to a\n domain](/managed-microsoft-ad/docs/seamless-domain-join-gce)."]]