<p>I am developing a chart and I had an error in it—incorrectly placed <code>imagePullSecrets</code>. When I tried to install it via</p>

<pre><code>helm install ./mychart
</code></pre>

<p>the misplaced element was simply ignored and I wondered what is wrong.</p>

<p>When I did</p>

<pre><code>helm template ./mychart | kubectl apply --dry-run -f -
</code></pre>

<p>it instead printed:</p>

<pre><code>error: error validating "STDIN": error validating data: ValidationError(Deployment.spec.template.spec.containers[0]): unknown field "imagePullSecrets" in io.k8s.api.core.v1.Container
</code></pre>

<p>which clearly shows what is wrong. I am not sure whether it matches what the tiller actually does with the expanded templates.</p>

<p>But if I just do a</p>

<pre><code>helm install --dry-run --debug ./mychart
</code></pre>

<p>it just shows the expanded template and looks OK.</p>

<p>So how do I correctly verify all my templates match corresponding schemata with helm?</p>

<p>You can lint the chart by going <code>helm lint ./mychart</code> which should print the following if an issue is found:</p>

<pre><code>$ helm lint ./mychart
==&gt; Linting ./mychart
[ERROR] Chart.yaml: version is required
[INFO] Chart.yaml: icon is recommended

Error: 1 chart(s) linted, 1 chart(s) failed
</code></pre>

<p>See <a href="https://docs.helm.sh/helm/#helm-lint" rel="noreferrer" title="helm lint">helm lint</a>.</p>
