

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 為多帳戶環境 (API) 設定 EKS 執行期監控
<a name="eks-runtime-monitoring-configuration-multiple-accounts"></a>

在多帳戶環境中，只有委派的 GuardDuty 管理員帳戶可以啟用或停用成員帳戶的 EKS 執行期監控，以及管理屬於其組織中成員帳戶之 EKS 叢集的 GuardDuty 代理程式管理。GuardDuty 成員帳戶無法從其帳戶修改此組態。委派的 GuardDuty 管理員帳戶使用 管理其成員帳戶 AWS Organizations。如需有關多帳戶環境的詳細資訊，請參閱 [Managing multiple accounts](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_accounts.html)。

## 為委派的 GuardDuty 管理員帳戶設定 EKS 執行期監控
<a name="eks-protection-configure-delegated-admin"></a>

本節提供設定 EKS 執行期監控和管理屬於委派 GuardDuty 管理員帳戶之 EKS 叢集的 GuardDuty 安全代理程式的步驟。

根據 [在 Amazon EKS 叢集中管理 GuardDuty 安全代理程式的方法](how-runtime-monitoring-works-eks.md#eksrunmon-approach-to-monitor-eks-clusters)，您可以選擇偏好的方法，並依照下表所述的步驟進行。


|  **GuardDuty 安全代理程式的偏好管理方法**  | **步驟** | 
| --- | --- | 
|  透過 GuardDuty 管理安全代理程式 (監控所有 EKS 叢集)  |  使用您的區域偵測器 ID，並將 `features` 物件名稱作為 `EKS_RUNTIME_MONITORING` 來以 `ENABLED` 狀態傳遞，進而執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateDetector.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateDetector.html) API。 將 `EKS_ADDON_MANAGEMENT` 的狀態設定為 `ENABLED`。 GuardDuty 將管理帳戶中所有 Amazon EKS 叢集的安全代理程式部署和更新。 或者，您可以使用自己的區域偵測器 ID 來使用 AWS CLI 命令。若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 主控台中的**設定**頁面，或執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API。 下列範例會啟用 `EKS_RUNTIME_MONITORING` 和 `EKS_ADDON_MANAGEMENT`： <pre>aws guardduty update-detector --detector-id 12abc34d567e8fa901bc2d34e56789f0 --features '[{"Name" : "EKS_RUNTIME_MONITORING", "Status" : "ENABLED", "AdditionalConfiguration" : [{"Name" : "EKS_ADDON_MANAGEMENT", "Status" : "ENABLED"}] }]'</pre>  | 
| 監控所有 EKS 叢集，但排除其中一些叢集 (使用排除標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
| 監控選定 EKS 叢集 (使用包含標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
|  手動管理安全代理程式  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 

## 為所有成員帳戶自動啟用 EKS 執行期監控
<a name="auto-enable-eksrunmon-existing-memberaccounts"></a>

本節包含為所有成員帳戶啟用 EKS 執行期監控和管理安全代理程式的步驟。這包括委派的 GuardDuty 管理員帳戶、現有的成員帳戶，以及加入組織的新帳戶。

根據 [在 Amazon EKS 叢集中管理 GuardDuty 安全代理程式的方法](how-runtime-monitoring-works-eks.md#eksrunmon-approach-to-monitor-eks-clusters)，您可以選擇偏好的方法，並依照下表所述的步驟進行。


|  **GuardDuty 安全代理程式的偏好管理方法**  | **步驟** | 
| --- | --- | 
|  透過 GuardDuty 管理安全代理程式 (監控所有 EKS 叢集)  |  若要為您的成員帳戶選擇性地啟用 EKS 執行期監控，請使用您自己的*偵測器 ID* 執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html) API 操作。 將 `EKS_ADDON_MANAGEMENT` 的狀態設定為 `ENABLED`。 GuardDuty 將管理帳戶中所有 Amazon EKS 叢集的安全代理程式部署和更新。 或者，您可以使用自己的區域偵測器 ID 來使用 AWS CLI 命令。若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 主控台中的**設定**頁面，或執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API。 下列範例會啟用 `EKS_RUNTIME_MONITORING` 和 `EKS_ADDON_MANAGEMENT`： <pre>aws guardduty update-member-detectors --detector-id 12abc34d567e8fa901bc2d34e56789f0 --account-ids 111122223333 --features '[{"Name" : "EKS_RUNTIME_MONITORING", "Status" : "ENABLED", "AdditionalConfiguration" : [{"Name" : "EKS_ADDON_MANAGEMENT", "Status" : "ENABLED"}] }]'</pre>  您也可以傳遞以空格分隔的帳戶 ID 清單。  當程式碼成功執行時，會返回一個空白 `UnprocessedAccounts` 清單。如果變更帳戶的偵測器設定時發生任何問題，則會列出該帳戶 ID 以及問題摘要。  | 
| 監控所有 EKS 叢集，但排除其中一些叢集 (使用排除標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
| 監控選定 EKS 叢集 (使用包含標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
|  手動管理安全代理程式  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 

## 為所有現有作用中成員帳戶設定 EKS 執行期監控
<a name="eks-protection-configure-active-members"></a>

本節包含為組織中現有的作用中成員帳戶啟用 EKS 執行期監控和管理 GuardDuty 安全代理程式的步驟。

根據 [在 Amazon EKS 叢集中管理 GuardDuty 安全代理程式的方法](how-runtime-monitoring-works-eks.md#eksrunmon-approach-to-monitor-eks-clusters)，您可以選擇偏好的方法，並依照下表所述的步驟進行。


|  **GuardDuty 安全代理程式的偏好管理方法**  |  **步驟**  | 
| --- | --- | 
|  透過 GuardDuty 管理安全代理程式 (監控所有 EKS 叢集)  |  若要為您的成員帳戶選擇性地啟用 EKS 執行期監控，請使用您自己的*偵測器 ID* 執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html) API 操作。 將 `EKS_ADDON_MANAGEMENT` 的狀態設定為 `ENABLED`。 GuardDuty 將管理帳戶中所有 Amazon EKS 叢集的安全代理程式部署和更新。 或者，您可以使用自己的區域偵測器 ID 來使用 AWS CLI 命令。若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 主控台中的**設定**頁面，或執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API。 下列範例會啟用 `EKS_RUNTIME_MONITORING` 和 `EKS_ADDON_MANAGEMENT`： <pre>aws guardduty update-member-detectors --detector-id 12abc34d567e8fa901bc2d34e56789f0 --account-ids 111122223333 --features '[{"Name" : "EKS_RUNTIME_MONITORING", "Status" : "ENABLED", "AdditionalConfiguration" : [{"Name" : "EKS_ADDON_MANAGEMENT", "Status" : "ENABLED"}] }]'</pre>  您也可以傳遞以空格分隔的帳戶 ID 清單。  當程式碼成功執行時，會返回一個空白 `UnprocessedAccounts` 清單。如果變更帳戶的偵測器設定時發生任何問題，則會列出該帳戶 ID 以及問題摘要。  | 
| 監控所有 EKS 叢集，但排除其中一些叢集 (使用排除標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
| 監控選定 EKS 叢集 (使用包含標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
|  手動管理安全代理程式  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 

## 為新成員自動啟用 EKS 執行期監控
<a name="eks-protection-configure-auto-enable-new-members"></a>

委派的 GuardDuty 管理員帳戶可以自動啟用 EKS 執行期監控，並選擇如何為加入組織的新帳戶管理 GuardDuty 安全代理程式的方法。

根據 [在 Amazon EKS 叢集中管理 GuardDuty 安全代理程式的方法](how-runtime-monitoring-works-eks.md#eksrunmon-approach-to-monitor-eks-clusters)，您可以選擇偏好的方法，並依照下表所述的步驟進行。


|  **GuardDuty 安全代理程式的偏好管理方法**  |  **步驟**  | 
| --- | --- | 
|  透過 GuardDuty 管理安全代理程式 (監控所有 EKS 叢集)  |  若要為您的新帳戶選擇性地啟用 EKS 執行期監控，請使用您自己的*偵測器 ID* 調用 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html) API 操作。 將 `EKS_ADDON_MANAGEMENT` 的狀態設定為 `ENABLED`。 GuardDuty 將管理帳戶中所有 Amazon EKS 叢集的安全代理程式部署和更新。 或者，您可以使用自己的區域偵測器 ID 來使用 AWS CLI 命令。若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 主控台中的**設定**頁面，或執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API。 下列範例會為單一帳戶啟用 `EKS_ADDON_MANAGEMENT` 和 `EKS_RUNTIME_MONITORING`。您也可以傳遞以空格分隔的帳戶 ID 清單。 若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 主控台中的**設定**頁面，或執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API。 <pre>aws guardduty update-organization-configuration --detector-id 12abc34d567e8fa901bc2d34e56789f0 --autoEnable  --features '[{"Name" : "EKS_RUNTIME_MONITORING", "AutoEnable": "NEW", "AdditionalConfiguration" : [{"Name" : "EKS_ADDON_MANAGEMENT", "AutoEnable": "NEW"}] }]'</pre> 當程式碼成功執行時，會返回一個空白 `UnprocessedAccounts` 清單。如果變更帳戶的偵測器設定時發生任何問題，則會列出該帳戶 ID 以及問題摘要。  | 
| 監控所有 EKS 叢集，但排除其中一些叢集 (使用排除標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
| 監控選定 EKS 叢集 (使用包含標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
|  手動管理安全代理程式  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 

## 為個別作用中成員帳戶啟用 EKS 執行期監控
<a name="eks-protection-configure-selectively-member-accounts"></a>

本節包含設定 EKS 執行期監控和管理個別作用中成員帳戶安全代理程式的步驟。

根據 [在 Amazon EKS 叢集中管理 GuardDuty 安全代理程式的方法](how-runtime-monitoring-works-eks.md#eksrunmon-approach-to-monitor-eks-clusters)，您可以選擇偏好的方法，並依照下表所述的步驟進行。


|  **GuardDuty 安全代理程式的偏好管理方法**  |  **步驟**  | 
| --- | --- | 
|  透過 GuardDuty 管理安全代理程式 (監控所有 EKS 叢集)  |  若要為您的成員帳戶選擇性地啟用 EKS 執行期監控，請使用您自己的*偵測器 ID* 執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html) API 操作。 將 `EKS_ADDON_MANAGEMENT` 的狀態設定為 `ENABLED`。 GuardDuty 將管理帳戶中所有 Amazon EKS 叢集的安全代理程式部署和更新。 或者，您可以使用自己的區域偵測器 ID 來使用 AWS CLI 命令。若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 主控台中的**設定**頁面，或執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API。 下列範例會啟用 `EKS_RUNTIME_MONITORING` 和 `EKS_ADDON_MANAGEMENT`： <pre>aws guardduty update-member-detectors --detector-id 12abc34d567e8fa901bc2d34e56789f0 --account-ids 111122223333 --features '[{"Name" : "EKS_RUNTIME_MONITORING", "Status" : "ENABLED", "AdditionalConfiguration" : [{"Name" : "EKS_ADDON_MANAGEMENT", "Status" : "ENABLED"}] }]'</pre>  您也可以傳遞以空格分隔的帳戶 ID 清單。  當程式碼成功執行時，會返回一個空白 `UnprocessedAccounts` 清單。如果變更帳戶的偵測器設定時發生任何問題，則會列出該帳戶 ID 以及問題摘要。  | 
| 監控所有 EKS 叢集，但排除其中一些叢集 (使用排除標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
| 監控選定 EKS 叢集 (使用包含標籤) |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 
|  手動管理安全代理程式  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/guardduty/latest/ug/eks-runtime-monitoring-configuration-multiple-accounts.html)  | 