Docs Menu
Docs Home
/ /
Atlas Command Line Interface
/ / /

atlas kubernetes config generate

Generate Kubernetes configuration resources.

This command provides your Kubernetes configuration access to Atlas. You can generate Atlas Operator resources for Atlas objects, including Projects, Deployments, and Users.

atlas kubernetes config generate [options]
Name
Type
Required
Description

--clusterName

strings

false

One or more comma separated cluster names to import

-h, --help

false

help for generate

--includeSecrets

false

Generate kubernetes secrets with data for projects, users, deployments entities

--operatorVersion

string

false

Version of Atlas Kubernetes Operator to generate resources for. This value defaults to "1.6.0".

--orgId

string

false

Organization ID to use. 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

Human-readable label that identifies the profile to use from your configuration file. To learn about profiles for the Atlas CLI, see https://dochub.mongodb.org/core/atlas-cli-save-connection-settings. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.

# Export Project, DatabaseUsers resources for a specific project without connection and integration secrets:
atlas kubernetes config generate --projectId=<projectId>
# Export Project, DatabaseUsers resources for a specific project including connection and integration secrets:
atlas kubernetes config generate --projectId=<projectId> --includeSecrets
# Export Project, DatabaseUsers resources for a specific project including connection and integration secrets to a specific namespace:
atlas kubernetes config generate --projectId=<projectId> --includeSecrets --targetNamespace=<namespace>
# Export Project, DatabaseUsers, and Deployment resources for a specific project including connection and integration secrets to a specific namespace:
atlas kubernetes config generate --projectId=<projectId> --clusterName=<cluster-name-1, cluster-name-2> --includeSecrets --targetNamespace=<namespace>
# Export resources for a specific version of the Atlas Kubernetes Operator:
atlas kubernetes config generate --projectId=<projectId> --targetNamespace=<namespace> --operatorVersion=1.5.1

Back

config

On this page