<p>We are starting a project from scratch that will be managed on Google Cloud Services. I'd like to use Google Kubernetes Engine. Our application will have multiple environments (Dev, Staging, Production). Each environment is setup as a new Project on Google Cloud.</p>

<p>What is unclear to me is how to parameterize our service/manifest files. For instance our deploy file below, anything in <code>{}</code> I'd like to pull from a list of variables per environment. In a previous post someone mentioned using Helm, but I cannot find much documentation supporting the use of helm this way.</p>

<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: webapp
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: {max-surge}
      maxUnavailable: 0
  selector:
    matchLabels:
      run: webapp
  template:
    metadata:
      labels:
        run: webapp
    spec:
      containers:
      - name: webapp
        image: {gcr-image-url}
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
        env:
        - name: DATABASE_URL
          valueFrom:
            secretKeyRef:
              name: app-secrets
              key: DATABASE_URL
        - name: SECRET_KEY_BASE
          valueFrom:
            secretKeyRef:
              name: app-secrets
              key: SECRET_KEY_BASE
</code></pre>

<p>What tools are available to manage my GKE environments? We'll use terraform for our infrastructure management, but again is there a larger wrapper I can use to set parameters per environment?</p>

hummmingbear
<p>Helm would work for this, as would kustomize. In the case of helm, you'll have separate values.yaml files (e.g. dev-values.yaml) with e.g.:</p>

<pre><code>max-surge: 2
gcr-image-url: project-23456/test
</code></pre>

<p>And then reference them in the yaml via:</p>

<pre><code>{{ .Values.max-surge }}
</code></pre>

<p>The when installing you would use <code>helm upgrade --install my-app . --values=dev-values.yaml</code></p>
