Kubernetes Config File Environment Variable

Hello everyone.

I want to pass from my CircleCI project environment variable to kubernetes config file. How can I do that?

I have a file config.yml:

apiVersion: v1
kind: ConfigMap

And the variables APP_NAME, APP_SUBGROUP and APP_GROUP are defined in the environment variables on CircleCI.

My .circleci/config.yml version is 2.1 and I’m using:

  gcp-cli: circleci/gcp-cli@1.8.3
  kubernetes: circleci/kubernetes@0.10.1

And in the middle of my .circleci/config.yml, I’m calling kubernetes orbs options:

      - kubernetes/install-kubectl
      - kubernetes/create-or-update-resource:
          resource-file-path: config/config.yml
          resource-name: deployment/config
          show-kubectl-command: true

So… What can I do to replace all my environment variables inside my k8s yamls configuration while my continuous deployment is running?

Thanks in advance.

Anybody knows how to help me?