<p>I want to use vars without ConfigMaps or Secrets. Declaring a value would be sufficient for me. But I couldn't see any documentation regarding vars attributes or how I can use. Do you know any docs about this? Thanks!</p>
<pre><code>vars:
  - name: ROUTE_HOST
    objref:
      kind: ConfigMap
      name: template-vars
      apiVersion: v1
    fieldref:
      fieldpath: data.ROUTE_HOST
</code></pre>

cosmos-1905-14
<p>Summarizing Jonas's comments:</p>
<blockquote>
<p>WARNING: There are plans to deprecate vars. For existing users of vars, we recommend migration to <a href="https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/replacements/" rel="nofollow noreferrer">replacements</a> as early as possible. There is a guide for convering vars to replacements at the bottom of this page under “convert vars to replacements”. For new users, we recommend never using vars, and starting with replacements to avoid migration in the future.</p>
</blockquote>
<p>Please find more information in <a href="https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/vars/" rel="nofollow noreferrer">the official documentation</a>.</p>
<p>Try to use replacements as it's suggested above.</p>
