The CLI allows you to export all resources in Lenses as requests so that they can be version controlled and imported into another environment.

Export operations are performed on a per resource basis, the directory structure is defined by the CLI whereas a base directory can be provided using the –dir flag.

Processors, connectors, topics and schemas have an additional prefix flag to restrict resources to export. The commands to export the configurations are shown in the table below.

aclsExport the ACL configuration
alert-channelsExport the alert channels configured
alert-settingsExport the alert setting configured
connectionsExport the connections configured
connectorsExport the connectors configured
processorsExport the processors created
quotasExport the quotas configured in Kafka
schemasExport the schamas configured
topicsExport the topics registered
policiesExport the policies configured
groupsExport the groups created
serviceaccountsExport the service accounts created
topic-settingsExport the topics settings

Exporting Configurations 

Commands showing how to export the configurations:

lenses-cli export acls --dir my-dir
lenses-cli export alert-channels --dir my-dir
lenses-cli export alert-settings --dir my-dir
lenses-cli export connections --dir my-dir
lenses-cli export connectors --dir my-dir
lenses-cli export processors --dir my-dir
lenses-cli export quotas --dir my-dir
lenses-cli export schemas --dir my-dir
lenses-cli export topics --dir my-dir
lenses-cli export policies --dir my-dir
lenses-cli export groups --dir my-dir
lenses-cli export serviceaccounts --dir my-dir
lenses-cli export topic-settings --dir my-dir

The directory structure created when you export the configuration is:

├── alert-settings
│   └── alert-setting.yaml
├── apps
│   ├── connectors
│   │   ├── connector-1.yaml
│   │   └── connector-2.yaml
├── groups
│   └── groups.yaml
├── kafka
│   ├── quotas
│   │   └── quotas.yaml
│   └── topics
│       ├── topic-1.yaml
│       └── topic-2.yaml
├── policies
│   └── policies-city.yaml
├── service-accounts
│   └── service-accounts.yaml
└── schemas
    ├── schema-1.yaml
    └── schema-2.yaml
Last modified: July 17, 2024