구성 컨트롤러에는 리전별 GKE 클러스터가 사용됩니다.
리전별 클러스터가 리전에서 단일 영역 장애를 허용할 수 있지만 해당 리전에서 여러 영역이 실패하면 클러스터를 사용할 수 없게 됩니다.
구성 컨트롤러 인스턴스가 실패하면 기존 Google Cloud 리소스가 현재 상태로 유지됩니다. 하지만 애플리케이션이 여전히 실행 중인 경우에도 구성 컨트롤러를 사용할 수 없으면 해당 구성을 변경할 수 없습니다. 이는 동일한 리전의 리소스와 사용할 수 없는 리전의 구성 컨트롤러에서 관리하는 다른 리전의 리소스에 적용됩니다.
동일한 리전에서 리소스를 재구성할 수 없으므로 리전 장애가 구성 컨트롤러 리전에서 기존 Google Cloud 리소스에 영향을 주는 경우, 해당 리소스를 복구할 수 없습니다.
다른 리전의 리소스를 다시 구성할 수도 없으므로 현재 한 리전에서 장애가 발생하면 다른 리전에서 변경할 수 없습니다.
다른 장애 시나리오도 가능합니다. 예를 들어 외부 Git 제공업체에서 가져오도록 구성 동기화를 구성할 경우 해당 Git 제공업체의 장애 모드를 고려해야 합니다. 변경사항을 Git 제공업체로 푸시할 수 없으므로 구성을 변경하지 못할 수 있습니다. 또는 구성 동기화가 Git에서 읽을 수 없으면 Git 변경사항이 클러스터에 적용되지 않으므로 구성 컨트롤러가 적용되지 않습니다. 하지만 리전 장애는 가장 중요한 장애 시나리오인 경우가 많습니다. 다른 장애 시나리오는 일반적으로 구성 컨트롤러 장애와 상관 관계가 없기 때문입니다.
리전 가용성에 단일 클러스터 사용
많은 시나리오에서 한 리전이 실패하면 재구성을 수행하지 않습니다.
이 경우 리전 장애로 인해 구성 제어 영역을 사용할 수 없게 될 수 있습니다.
예를 들어 단일 리전에서만 작동하는 경우 해당 리전이 실패하면 수행할 수 있는 유용한 재구성이 없을 수 있습니다. 마찬가지로 단일 장애점 데이터베이스가 단일 리전에 있으면 해당 리전이 복구될 때까지 복구되지 못할 수 있습니다. 절대적인 최고 가용성이 필요하지 않은 애플리케이션에서는 비용이나 복잡성이 적절하게 절충될 수 있습니다.
동일한 리전에서 구성 컨트롤러 인스턴스를 찾으면 기본 리전을 사용할 수 있는 한 구성 컨트롤러를 사용할 수 있습니다. 다른 리전에서 구성 컨트롤러 인스턴스를 찾는 것도 좋은 선택일 수 있습니다. 이제 두 리전의 잠재적 장애를 생각해야 하지만 구성 제어 영역의 상관관계가 있는 장애와 기본 리전의 장애를 방지할 수 있습니다.
또는 멀티 리전 중복 구성이 있으면 시스템이 자동으로 실패한 리전에서 벗어날 수 있습니다. 또한 리전이 실패하면 재구성을 수행하지 않지 않는 것이 좋습니다. 이 경우 단일 구성 컨트롤러 인스턴스를 선택할 수 있습니다.
두 번째 구성 컨트롤러 인스턴스로 수동 장애 조치
리전이 실패하면 오류 해결을 위해 일부 재구성 작업을 수행해야 수 있습니다. 또한 구성 컨트롤러 인스턴스가 실패한 리전에 있더라도 다른 리전에서 리소스를 계속 구성해야 할 수 있습니다. 이 경우에는 두 번째 리전에서 두 번째 구성 컨트롤러 인스턴스를 사용하는 것이 좋습니다.
권장하지는 않지만 두 구성 컨트롤러 인스턴스를 동일한 구성으로 실행할 수 있습니다. 둘 다 동일한 Git 저장소에서 읽고 Google Cloud에 동일한 변경사항을 적용해야 합니다. 그러나 다양한 특이 사례로 인해 이 구성의 안정성이 저하됩니다. 두 구성 컨트롤러 인스턴스는 약간 다른 시점에 Git 저장소를 관찰합니다. Google Cloud 구성의 약간 다른 버전을 적용하려고 할 수 있습니다. Google Cloud에 여러 활성 작성자가 있으면 할당량이나 비율 제한이 발생할 가능성이 높습니다.
소수의 구성 컨트롤러 리소스도 멱등성을 갖지 않으므로 이 섹션의 나머지 부분에서 설명하는 것처럼 더욱 주의해야 합니다. 따라서 구성 컨트롤러 클러스터 두 개 모두 적극적으로 조정하지 않는 것이 좋습니다.
대신 구성 컨트롤러를 실행하는 리전ㅇ이 실패하면 두 번째 리전에서 다른 구성 컨트롤러를 실행하는 것이 좋습니다. 새 구성 컨트롤러 인스턴스를 첫 번째 인스턴스와 동일하게 구성해야 합니다. 그러면 동일한 Git 저장소에서 읽습니다. 이 시나리오에서는 구성 컨트롤러 인스턴스를 불러오고 구성하는 스크립트를 미리 준비하는 것이 유용할 수 있습니다. 새 구성 컨트롤러 인스턴스를 만들면 구성 동기화는 Git에서 원하는 상태를 읽고 Kubernetes에 적용합니다. 구성 커넥터는 원하는 상태를 Google Cloud에 동기화합니다.
여기에서는 두 가지 사항에 주의해야 합니다.
첫 번째 구성 컨트롤러 클러스터가 계속 실행 중이거나 첫 번째 리전이 복구될 때 실행을 시작하면 Google Cloud에 이전 상태를 적용하려고 할 수 있습니다. 두 번째 구성 컨트롤러 클러스터를 시작하기 전에 첫 번째 리전에서 구성 컨트롤러 클러스터를 중지할 수 있으면 이러한 잠재적인 충돌을 방지할 수 있습니다.
일부 구성 커넥터 리소스는 Git에서 원활하게 다시 적용될 수 없습니다.
특별한 주의가 필요한 리소스 목록은 획득 관련 제한사항이 있는 리소스를 참조하세요.
특히 Folder 리소스를 주의하고 IAMServiceAccountKey 리소스를 피하는 것이 좋습니다(예: 대신 GKE 워크로드 아이덴티티 사용).
리전당 구성 컨트롤러 인스턴스 1개
한 리전의 구성 컨트롤러 인스턴스가 다른 리전에 영향을 주지 않도록 하려면 리전별로 구성 컨트롤러 인스턴스를 실행하는 것이 좋습니다. 여기서 각 구성 컨트롤러 인스턴스는 해당 리전의 리소스를 관리합니다.
이 구성은 작동 가능하지만 다음 이유에 따라 권장되는 옵션 중 하나가 아닙니다.
Cloud DNS와 같이 일부 리소스가 여러 리전에 걸쳐 있으므로 이 전략의 효과가 제한됩니다.
일반적으로 동일한 리전에 구성 컨트롤러 클러스터가 있으면 상관 관계 장애 문제가 발생합니다. 즉, 리전 장애가 해당 리전의 구성 컨트롤러에 영향을 미치는 경우 리소스를 정확하게 다시 구성하려고 합니다.
구성 커넥터 리소스를 리전별로 분할해야 합니다.
현재 일부 리전에서는 구성 컨트롤러를 사용할 수 없습니다.
Google Cloud 리소스 직접 구성
예외적인 경우 Git 또는 구성 커넥터를 거치지 않고 기본 Google Cloud 리소스를 직접 변경할 수 있습니다.
구성 컨트롤러는 모든 '드리프트'를 해결하려고 하므로 구성 컨트롤러 인스턴스가 계속 실행 중인 경우 구성 컨트롤러는 수동으로 변경한 모든 내용을 '드리프트'로 간주하고 되돌리려고 합니다.
하지만 Config Controller 인스턴스를 중지하거나 리전이 오프라인 상태인 경우 유용한 임시방편이 될 수 있습니다.
구성 컨트롤러 인스턴스가 복구되면 구성 커넥터에서 수동 변경사항을 되돌리려고 합니다. 이 상황을 방지하려면 수동 변경사항을 Git에서 변경하면 됩니다.
[[["이해하기 쉬움","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-07-19(UTC)"],[],[],null,["# Configure Config Controller for high-availability\n\nThis page shows you how best to use Config Controller when operating\nhighly-available services or managing resources in multiple Google Cloud regions.\n\nThis page is for Admins and architects and Operators who\nmanage the lifecycle of the underlying tech infrastructure and plan capacity and\ninfrastructure needs. To learn more about common roles and example tasks that we\nreference in Google Cloud content, see\n[Common GKE user roles and tasks](/kubernetes-engine/enterprise/docs/concepts/roles-tasks).\n\nConfig Controller runs in a single region,\nso it can tolerate the failure of an availability zone, but if an entire region\nfails, Config Controller loses availability. There are two different\nstrategies to deal with regional failure, and your choice depends on what you\nwould do if a region fails:\n\n- If you would make configuration changes in response to a regional failure,\n [create a second Config Controller instance](#second-config-controller-manual-failover).\n\n- If you would not make configuration changes,\n [use a single Config Controller instance](#single-config-controller).\n\n| **Note:** While planning for failure is important, [regions offer sufficient availability for many applications](/compute/docs/regions-zones).\n\nUnderstand failure scenarios\n----------------------------\n\nConfig Controller uses a\n[regional GKE cluster](/kubernetes-engine/docs/concepts/regional-clusters).\nAlthough the regional cluster can tolerate the failure of a single zone in a\nregion, the cluster becomes unavailable if multiple zones in the region fail.\n\nIf your Config Controller instance fails, your existing Google Cloud\nresources remain in their current state. However, even if your applications are\nstill running, you cannot change their configuration when Config Controller\nis unavailable. This applies to resources in the same region and to\nresources in other regions that you are managing from the Config Controller\nin the unavailable region.\n\nBecause you can't reconfigure resources in the same region, if a regional\nfailure *does* affect existing Google Cloud resources in the Config Controller\nregion, you cannot repair those resources.\n\nBecause you also can't reconfigure resources in other regions, a failure\nin one region has now affected your ability to make changes in another region.\n\nOther failure scenarios are also possible. For example, if you configure\nConfig Sync to pull from an external Git provider, you should consider the\nfailure modes of that Git provider. You might not be able to make configuration\nchanges because you cannot push changes to that Git provider. Or if\nConfig Sync cannot read from Git, then any Git changes aren't applied to the\ncluster, and so Config Connector does not apply them. However, regional failure is\noften the most important failure scenario, because other failure scenarios are\ntypically uncorrelated with Config Controller failure.\n\nUse a single cluster for regional availability\n----------------------------------------------\n\nIn many scenarios, you would not perform any reconfiguration if a region fails.\nIn that case, you might choose to accept that a regional failure causes your\nconfiguration control-plane to become unavailable.\n\nFor example, if you only operate in a single region, there might not be any\nuseful reconfiguration you can do if that region fails. Similarly, if you have a\nsingle point of failure database in a single region, you might not be able to\nrecover until that region recovers. For applications that do not need the\nabsolute highest availability, this situation can be a reasonable trade-off\nagainst cost and complexity.\n\nLocating the Config Controller instance in the same region gives you a shared\nfate: Config Controller is available as long as your primary region is\navailable. Locating the Config Controller instance in a *different* region\ncan also be a good choice; although you now have to think about potential\nfailures in two regions, you avoid the correlated-failure of your configuration\ncontrol-plane with the failure of your primary region.\n\nAlternatively, if you have a multi-regional redundant configuration,\nyour system might automatically steer away from failed regions. Here too, you\nmight not want to do reconfiguration if a region fails. In this case, you might\nchoose a single Config Controller instance.\n\nManually failover to a second Config Controller instance\n--------------------------------------------------------\n\nYou might want to do some reconfiguration if a region fails so that you can\nremedy the failure. You might also want to continue configuring resources in\nother regions, even if your Config Controller instance is located in a\nfailed region. In this case, we recommend using a second Config Controller\ninstance in a second region.\n\nThough it is not recommended, two Config Controller instances can run with\nidentical configurations. Both instances race to read from the same Git repository\nand apply the same changes to Google Cloud. However, numerous edge-cases\nmake this configuration unreliable. The two Config Controller instances observe\nthe Git repository at slightly different times; they might attempt to apply\nslightly different versions of your Google Cloud configuration. Multiple\nactive writers to Google Cloud make it more likely that you encounter quotas or rate limits.\nA small number of Config Connector resources are also\n[not idempotent](/config-connector/docs/how-to/managing-deleting-resources#resources_with_restrictions_around_acquisition),\nand need extra care as discussed in the rest of this section. We therefore\nrecommend against having two Config Controller clusters both actively\nreconciling.\n\nWe recommend instead that if the region running your Config Controller\nfails, then you run another Config Controller in a second\nregion. The new Config Controller instance should be configured identically\nto the first one, reading from the same Git repository. Pre-preparing\na script to bring up and configure your Config Controller instance might\nbe useful in this scenario. When you create your new Config Controller instance,\nConfig Sync reads and applies the desired state from Git to Kubernetes;\nConfig Connector synchronizes the desired state to Google Cloud.\n\nThere are two things to be careful of in this situation:\n\n- If the first Config Controller cluster is still running, or starts\n running when the first region recovers, then it might attempt to apply the old\n state to Google Cloud. If you can stop the Config Controller cluster in the\n first region before starting a second Config Controller cluster,\n you can avoid this potential conflict.\n\n- Not all Config Connector resources can be seamlessly reapplied from Git.\n For the list of resources that need special care, see [resources with\n restrictions around acquisition](/config-connector/docs/how-to/managing-deleting-resources#resources_with_restrictions_around_acquisition).\n In particular, we recommend being careful around `Folder` resources, and\n avoiding `IAMServiceAccountKey` resources (for example, using GKE\n Workload Identity Federation for GKE instead).\n\n| **Note:** If you need to reconfigure resources when a region fails, you should consider running Config Controller in a *different* region from your primary Google Cloud services. This configuration helps you avoid a single regional failure affecting your Config Controller instance at the exact time you need it.\n\nOne Config Controller instance per region\n-----------------------------------------\n\nIf you want to avoid a Config Controller instance in one region affecting\nanother region, you might also consider running a Config Controller\ninstance per region, where each Config Controller instance manages\nresources in that region.\n\nThis configuration is workable, but it isn't one of our recommended options\nfor the following reasons:\n\n- Some resources span multiple regions (such as Cloud DNS), which makes this\n strategy limited.\n\n- Generally, having a Config Controller cluster in the same region\n encounters the correlated-failure problem: you want to reconfigure resources\n exactly when a regional failure affects the Config Controller in\n that region.\n\n- You have to split up your Config Connector resources by region.\n\n- Config Controller is not currently available in all regions.\n\nDirectly configuring Google Cloud resources\n-------------------------------------------\n\nIn exceptional circumstances, you might make changes directly to the\nunderlying Google Cloud resources, without going through Git or Config Connector.\nConfig Connector tries to remediate any \"drift\", so if your Config Controller\ninstance is still running, Config Connector considers any changes you make manually\nto be \"drift\" and tries to revert them.\n\nHowever, if you stop your Config Controller instance, or if the region is\noffline, this can be a useful stop-gap measure.\n\nWhen your Config Controller instance recovers, Config Connector will likely try\nto revert your manual changes. To avoid this situation, you can make corresponding\nchanges in Git for any changes you make manually."]]