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

atlas kubernetes config apply

在此页面上

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

生成并应用 Kubernetes 配置资源,以便与 Atlas Kubernetes Operator 一起使用。

此命令将 Atlas 对象(包括项目、部署和用户)的配置直接导出到 Kubernetes,以便您使用 Atlas Kubernetes Operator 管理这些资源。 有关更多信息,请参阅 https://www.mongodb.com/zh-cn/docs/atlas/atlas-operator/。

命令语法
atlas kubernetes config apply [options]
名称
类型
必需
说明
--clusterName
字符串
false
要导入的一个或多个以逗号分隔的集群名称
-h,--help
false
申请帮助
--kubeContext
字符串
false
要使用的 kubeconfig 上下文的名称。
--kubeconfig
字符串
false
用于 CLI 请求的 kubeconfig 文件的路径。
--operatorVersion
字符串
false
要为其生成资源的 Atlas Kubernetes Operator 版本。
--orgId
字符串
false
要使用的组织 ID。 此选项会覆盖配置文件或环境变量中的设置。
--projectId
字符串
false
标识要使用的项目的十六进制字符串。 此选项会覆盖配置文件或环境变量中的设置。
--targetNamespace
字符串
false
用于生成的 Kubernetes 实体的命名空间
名称
类型
必需
说明
-P, --profile
字符串
false
# Export and apply all supported resources of a specific project:
atlas kubernetes config apply --projectId=<projectId>
# Export and apply all supported resources of a specific project and to a specific namespace:
atlas kubernetes config apply --projectId=<projectId> --targetNamespace=<namespace>
# Export and apply all supported Project resource, and only the described Deployment resources of a specific project to a specific namespace:
atlas kubernetes config apply --projectId=<projectId> --clusterName=<cluster-name-1, cluster-name-2> --targetNamespace=<namespace>
# Export and apply all supported resources of a specific project to a specific namespace restricting the version of the Atlas Kubernetes Operator:
atlas kubernetes config apply --projectId=<projectId> --targetNamespace=<namespace> --operatorVersion=1.5.1

后退

配置

来年

生成