nais kafka credentials
nais kafka credentials [flags]
Creates temporary credentials for accessing Kafka. Output format can be env (default), kcat, or java. The env format prints environment variables to stdout. The kcat and java formats write configuration files to a temporary directory.
Options
-o,--output- Output format (env, kcat, java). Defaults to env.
--ttl- Time-to-live for the credentials (e.g. ‘1d’, ‘7d’). Maximum 30 days.
Inherited options
--config- Specify the
PATHto the configuration file. -e,--environment- Specify the
ENVIRONMENTto use for this command. Overrides the default environment from configuration. --no-colors- Disable colors in the output.
-t,--team- Specify the
TEAMto use for this command. Overrides the default team from configuration. -v,--verbose- Set verbosity level. Use -v for verbose, -vv for debug, -vvv for trace.
Examples
# Create Kafka credentials in environment dev, valid for 1 day, output as environment variables.
$ nais kafka credentials --environment dev --ttl 1d
# Create Kafka credentials and output kcat configuration files.
$ nais kafka credentials --environment dev --ttl 1d --output kcat
# Create Kafka credentials and output Java configuration files.
$ nais kafka credentials --environment dev --ttl 1d --output java