Skip to content

cub worker get-envs

cub worker get-envs

Get a worker's environment variables

Synopsis

Get the environment variables a worker process authenticates with: the worker's ID and secret. The output holds the secret, so write it where the process reads it rather than printing it into a shared log.

Examples:

  # Get the environment variables for a worker
  cub worker get-envs <worker-slug>

  # Emit plain KEY=value lines (no shell prefix, no comments). Suitable for
  # writing to a .env file or feeding to a kustomize secretGenerator.
  cub worker get-envs --no-export <worker-slug>
cub worker get-envs <worker-slug> [flags]

Options

  -h, --help        help for get-envs
      --no-export   Emit plain KEY=value lines without shell-specific export/setenv prefixes or source-with comments

Options inherited from parent commands

      --component string   the Component of --variant, when that names the variant alone; --variant <component>/<variant> says the same in one flag
      --context string     The context to use for this command
      --debug              Debug output
      --space string       space to operate in, by slug or UUID. Omitted, a list or bulk operation spans the organization and a single entity is named as <space>/<slug>; "*" means the same as omitting it
      --variant string     variant to operate in, as <component>/<variant>, or as <variant> with --component: the space naming that Component whose Variant label is <variant>. The same scope as --space, named by what it is rather than by the space's slug; the two cannot be combined

SEE ALSO