<p>I'm a beginner of helm and Kubernetes in general. Recently I have started trialling deployments to an AKS cluster which will include multiple Cluster IP services hidden behind a load balancing NGINX node. For today I'm using Helm 2.2 and have successfully installed the NGINX node. My understanding is now that for each of my individual service charts in Helm I use annotations to enable Nginx routing. As I see it, I should be able to modify the values.yaml file at the top of the chart (nowhere else) to perform these actions. </p>

<pre><code>service:
  type: ClusterIP
  port: 80

ingress:
  enabled: true
  annotations: 
    kubernetes.io/ingress.class: nginx
  hosts:
    - chart-example.local
</code></pre>

<p>When I execute the above (the rest of the file is excluded for brevity) I receive the error "converting YAML to JSON: yaml: line 38: did not find expected key." </p>

<p>Line 38 corresponds to the end of the ingress section (the blank line straight afterwards). I'm assuming that my yaml is badly formed, and I cannot for the life of me find any examples of this file being used in this fashion. Am I doing it right? If yes what mistake have I made in the yaml. If not, what should I be doing to route to one of my many services via the ingress file? Are there any actual examples of the values.yaml file being set in this fasion to be seen somewhere? Every time I search I find the Ingress.yaml file is modified as a Kubernetes object rather than as a templated Helm chart.</p>

<p>It turns out that with the values.yaml I didn't give people a fair chance. The offending yaml line happened <em>after</em> the code fragment that I provided and was subtle. The code that was necessary to ensure the correct ingress definition was supplied is this:</p>

<pre><code>ingress:
enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
  hosts:
    - host: chart-example.local
      paths:
        - /test

  tls: {}
</code></pre>

<p>My mistake was the tls line that came afterwards. I had neglected to realise that the indendenting of the tls section meant it was included with the ingress section and it had <em>one missing space</em>.</p>

<pre><code>_tls: {}
</code></pre>

<p>instead of</p>

<pre><code> __tls: {}
</code></pre>

<p>My example now renders the template correctly (the underscores are only included to demonstrate the number of spaces and should be removed of course).</p>
