Skip to content


Export cluster-wide broker configuration to definitions (Kafka 0.11.0+).


kdef export brokers [options]

Exports to stdout by default. Supply the --output-dir option to create definition files.


Export brokers definition to the directory "brokers".

kdef export brokers --output-dir "brokers"

Export brokers definition to stdout.

kdef export brokers --quiet


  • --format / -f (string)

    Resource definition format. Must be either yaml or json. The default value is yaml.

  • --output-dir / -o (string)

    Output directory path for definition files. Non-existent directories will be created.

  • --overwrite / -w (bool)

    Overwrite existing files in output directory. The default value is false.

Global options

  • -no-color (bool)

    Disable colored output. The default value is false.

  • --quiet / -q (boolean)

    Enable quiet mode (output errors only). The default value is false.

  • --verbose / -v (boolean)

    Enable debug output. The default value is false.

  • --config-path / -p (string)

    Path to configuration file. Defaults to a file named config.yml in the current working directory.

  • --config-opt / -X ([]string)

    Option provided configuration (e.g. -X timeoutMs=6000). This is a repeatable option.