Docs Menu
Docs Home
/ /
Atlas CLI
/ / /

atlas kubernetes config apply

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples

Generate and apply Kubernetes configuration resources for use with Atlas Kubernetes Operator.

This command exports configurations for Atlas objects including projects, deployments, and users directly into Kubernetes, allowing you to manage these resources using the Atlas Kubernetes Operator. For more information, see https://www.mongodb.com/docs/atlas/atlas-operator/.

Command Syntax
atlas kubernetes config apply [options]
Name
Type
Required
Description

--clusterName

strings

false

One or more comma separated cluster names to import

-h, --help

false

help for apply

--kubeContext

string

false

Name of the kubeconfig context to use.

--kubeconfig

string

false

Path to the kubeconfig file to use for CLI requests.

--operatorVersion

string

false

Version of Atlas Kubernetes Operator to generate resources for.

--orgId

string

false

Organization ID to use. This option overrides the settings in the configuration file or environment variable.

--projectId

string

false

Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.

--targetNamespace

string

false

Namespaces to use for generated kubernetes entities

Name
Type
Required
Description

-P, --profile

string

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

Back

config