<p>I have yaml template in VS 2019 with variables like below.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>apiVersion: apps/v1beta2
kind: Deployment
metadata:
  name: {{ template "kubernetes1.fullname" . }}
  labels:
    app: {{ template "kubernetes1.name" . }}
    chart: {{ template "kubernetes1.chart" . }}
    draft: {{ .Values.draft | default "draft-app" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
etc.....</code></pre>
</div>
</div>
</p>

<p>Now I want to see the output of fully generated yaml by filling those variable values. Is there a way?</p>

Jaish Mathews
<p>If I understand you correctly, what you are looking for is <code>kubectl</code> flag <code>--dry-run</code>.</p>

<p>Here is a link to the documentation references for this <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands" rel="nofollow noreferrer"><code>kubectl create</code></a>.</p>

<p>If you use the <code>dry-run</code> flag this will take your <code>yaml</code> and create it without applying it to the cluster.</p>

<p>Also if you want to see the output of that <code>yaml</code> you should use <code>-o yaml</code>, which redirects the output to yaml format.</p>
