79464639

Date: 2025-02-24 19:46:18
Score: 1.5
Natty:
Report link

You can pass environment variables to your arguments by using parentheses () instead of braces {}

    envFrom:
    - secretRef:
        name: secret     
    command: ["my-command"]
    args:
      - "--env=ENV1=$(MY_ENV_VAR1)"
      - "--env=env2=$(MY_ENV_VAR2)"

Kubernetes docs have an example here for reference: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#use-environment-variables-to-define-arguments

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: David N