Answers for "set dynamic values with kubernetes yaml file template"

0

set dynamic values with kubernetes yaml file template

1

I create a script called kubectl_apply. It loads variables from .env, replace ${CUSTOMVAR} in yml and pass it to kubectl command

  #!/bin/bash
  set -a
  source .env
  set +a
  eval "cat <<EOF
  $(<$1)
  EOF
  " | kubectl apply -f -
Posted by: Guest on March-09-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language