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. --confirm-login- Ask for confirmation before starting required login flows. Interactive terminals only.
-e,--environment- Select or filter by Nais
ENVIRONMENT, for example dev-gcp or prod-gcp. Overrides the environment configured with nais defaults set environment. --no-colors- Disable colors in the output.
-t,--team- Select the Nais
TEAMthat owns the resources. Overrides the team configured with nais defaults set team. -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