Docs 菜单
Docs 主页
/ /
Atlas
/ / /

Atlas Kubernetes Operator install

在此页面上

  • 语法
  • 选项
  • 继承选项
  • 举例

将 Atlas Kubernetes Operator 安装到集群。

此命令将受支持版本的 Atlas Kubernetes Operator 安装到现有集群,并可选择导入由操作符托管的 Atlas 资源。

此命令为 Operator 创建一个 API 密钥,并将其作为密钥添加到 Kubernetes,然后 Operator 使用该密钥来进行 Atlas Admin API 调用。 当您指定 --projectName 选项时,密钥的范围限定为项目;当您省略 --projectName 选项时,密钥的范围限定为组织。

命令语法
atlas kubernetes operator install [options]
名称
类型
必需
说明
--atlasGov
false
标志,表示是否将 Atlas for Government 配置为操作符的目标。
-h,--help
false
安装帮助
--import
false
标志,表示是否将现有 Atlas 资源导入集群以供操作符进行管理。
--kubeContext
字符串
false
要使用的 kubeconfig 上下文的名称。
--kubeconfig
字符串
false
用于 CLI 请求的 kubeconfig 文件的路径。
--operatorVersion
字符串
false
要安装的 Operator 版本。
--orgId
字符串
false
要使用的组织 ID。 此选项会覆盖配置文件或环境变量中的设置。
--projectName
字符串
false
要创建或与已安装的 操作符 一起使用的项目名称。
--resourceDeletionProtection
false
为项目、部署等资源切换 Atlas 操作符删除保护。了解更多信息: https://dochub.mongodb.org/core/ako-deletion-protection此值默认为 true。
--subresourceDeletionProtection
false
为警报、集成等子资源切换 Atlas 操作符删除保护。了解更多信息: https ://dochub.mongodb.org/core/ako-deletion-protection此值默认为 true。
--targetNamespace
字符串
false
安装操作符的命名空间。
--watchNamespace
字符串
false
包含操作符将侦听的命名空间的列表。
名称
类型
必需
说明
-P, --profile
字符串
false
要从配置文件中使用的配置文件的名称。 要了解 Atlas CLI 的配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings。
# Install latest version of the operator into the default namespace:
atlas kubernetes operator install
# Install the latest version of the operator targeting Atlas for Government instead of regular commercial Atlas:
atlas kubernetes operator install --atlasGov
# Install a specific version of the operator:
atlas kubernetes operator install --operatorVersion=1.7.0
# Install a specific version of the operator to a namespace and watch only this namespace and a second one:
atlas kubernetes operator install --operatorVersion=1.7.0 --targetNamespace=<namespace> --watchNamespace=<namespace>,<secondNamespace>
# Install and import all objects from an organization:
atlas kubernetes operator install --targetNamespace=<namespace> --orgID <orgID> --import
# Install and import objects from a specific project:
atlas kubernetes operator install --targetNamespace=<namespace> --orgID <orgID> --projectName <project> --import
# Install the operator and disable deletion protection:
atlas kubernetes operator install --resourceDeletionProtection=false
# Install the operator and disable deletion protection for sub-resources (Atlas project integrations, private endpoints, etc.):
atlas kubernetes operator install --subresourceDeletionProtection=false

后退

运算符

来年

liveMigrations