

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 自动管理 Amazon EKS 资源的安全代理
<a name="managing-gdu-agent-eks-automatically"></a>

运行时监控支持通过 GuardDuty 自动配置和手动启用安全代理。本节介绍了为 Amazon EKS 集群启用自动代理配置的步骤。

在继续操作之前，请确保您已满足 [Amazon EKS 集群支持的先决条件](prereq-runtime-monitoring-eks-support.md)的要求。

根据您偏好的[通过以下方式管理安全代理 GuardDuty](how-runtime-monitoring-works-eks.md#eks-runtime-using-gdu-agent-management-auto)的方法，相应地选择以下各章节中的步骤。

## 为多账户环境配置自动代理
<a name="eks-runtime-monitoring-agent-manage-multiple-account"></a>

在多账户环境中，只有委派的 GuardDuty 管理员账户才能启用或禁用成员账户的自动代理配置，以及管理属于其组织中成员账户的 EKS 集群的自动代理。 GuardDuty 成员账户无法通过其账户修改此配置。委托 GuardDuty 管理员账户账户使用管理其成员账户 AWS Organizations。有关多账户环境的更多信息，请参阅[管理多个账户](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_accounts.html)。

### 为委派的 GuardDuty 管理员账户配置自动代理配置
<a name="eks-runtime-configure-agent-delegated-admin"></a>


| **管理 GuardDuty 安全代理的首选方法** | **步骤** | 
| --- | --- | 
|  通过以下方式管理安全代理 GuardDuty （监控所有 EKS 集群）  | 如果在“运行时监控”部分中选择了**为所有账户启用**，您将有以下选项： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html) 如果您在“运行时监控”部分选择了**手动配置账户**，请执行以下操作： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html) 选择**保存**。  | 
| 监控所有 EKS 集群，但排除其中一些集群（使用排除标签） | 从以下过程中，选择一种适合您的场景。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
|  使用包含标签监控选择性 EKS 集群  | 无论您选择通过哪种方式启用运行时监控，以下步骤都将有助您监控账户中的选定 EKS 集群： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
| 手动管理 GuardDuty 安全代理 | 无论您选择通过哪种方式启用运行时监控，都可以手动管理 EKS 集群的安全代理。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html) | 

### 为所有成员账户自动启用自动代理
<a name="eks-runtime-monitoring-agent-auto-enable-existing-member-accounts"></a>

**注意**  
更新成员账户的配置可能最长需要 24 小时。


| **管理 GuardDuty 安全代理的首选方法** | **步骤** | 
| --- | --- | 
|  通过以下方式管理安全代理 GuardDuty （监控所有 EKS 集群）  |  本主题旨在为所有成员账户启用运行时监控，因此以下步骤假定您在“运行时监控”部分选择了**为所有账户启用**。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
| 监控所有 EKS 集群，但排除其中一些集群（使用排除标签） | 从以下过程中，选择一种适合您的场景。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
|  使用包含标签监控选择性 EKS 集群  | 无论您选择通过哪种方式启用运行时监控，以下步骤都将有助您监控组织中所有成员账户的选定 EKS 集群： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
| 手动管理 GuardDuty 安全代理 | 无论您选择通过哪种方式启用运行时监控，都可以手动管理 EKS 集群的安全代理。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 

### 为所有现有活动成员账户启用自动代理
<a name="eks-runtime-monitoring-agent-all-active-members"></a>

**注意**  
更新成员账户的配置可能最长需要 24 小时。

**管理组织中现有活跃成员账户 GuardDuty 的安全代理**
+  GuardDuty 要从属于组织中现有活跃成员账户的 EKS 集群接收运行时事件，您必须选择首选方法来管理这些 EKS 集群 GuardDuty 的安全代理。有关每种方法的更多信息，请参阅 [在 Amazon EKS 集群中管理 GuardDuty 安全代理的方法](how-runtime-monitoring-works-eks.md#eksrunmon-approach-to-monitor-eks-clusters)。    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)

### 为新成员自动启用自动代理配置
<a name="eks-runtime-monitoring-agent-auto-enable-new-members"></a>


| **管理 GuardDuty 安全代理的首选方法** | **步骤** | 
| --- | --- | 
|  通过以下方式管理安全代理 GuardDuty （监控所有 EKS 集群）  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
| 监控所有 EKS 集群，但排除其中一些集群（使用排除标签） | 从以下过程中，选择一种适合您的场景。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
|  使用包含标签监控选择性 EKS 集群  | 无论您选择通过哪种方式启用运行时监控，以下步骤都将有助您监控组织中新成员账户的选定 EKS 集群。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
|  手动管理 GuardDuty 安全代理  | 无论您选择通过哪种方式启用运行时监控，都可以手动管理 EKS 集群的安全代理。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 

### 有选择地为活动成员账户配置自动代理
<a name="eks-runtime-monitoring-agent-selectively-member-accounts"></a>


| **管理 GuardDuty 安全代理的首选方法** | **步骤** | 
| --- | --- | 
|  通过以下方式管理安全代理 GuardDuty （监控所有 EKS 集群）  | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html) | 
|  监控所有 EKS 集群，但排除其中一些集群（使用排除标签）  | 从以下过程中，选择一种适合您的场景。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
|  使用包含标签监控选择性 EKS 集群  |  无论您选择通过哪种方式启用运行时监控，以下步骤都将有助您监控属于选定账户的选定 EKS 集群： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 
|  手动管理 GuardDuty 安全代理  | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)  | 

## 为独立账户配置自动代理
<a name="eks-runtime-monitoring-agent-manage-standalone-account"></a>

独立账户拥有在特定账户中启用或禁用保护计划的决定 AWS 区域。 AWS 账户 

如果您的账户通过或通过 AWS Organizations邀请方式与 GuardDuty 管理员帐户关联，则此部分不适用于您的账户。有关更多信息，请参阅 [为多账户环境启用运行时监控](enable-runtime-monitoring-multiple-acc-env.md)。

启用运行时监控后，请确保通过自动配置或手动部署来安装 GuardDuty 安全代理。在完成以下过程中列出的所有步骤时，务必要安装安全代理。

根据您是要监控全部还是部分 Amazon EKS 资源的偏好，选择一种您偏好的方法并按照下表中的步骤进行操作。

1. 登录 AWS 管理控制台 并打开 GuardDuty 控制台，网址为[https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/)。

1. 在导航窗格中，选择**运行时监控**。

1. 在**配置**选项卡下选择**启用**，以为您的账户启用自动代理配置。    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/guardduty/latest/ug/managing-gdu-agent-eks-automatically.html)