Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

578
Views
When using helm charts to deploy an nginx load balanced service, what should the helm values.yaml look like?

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.

service:
  type: ClusterIP
  port: 80

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

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."

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.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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

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

  tls: {}

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 one missing space.

_tls: {}

instead of

 __tls: {}

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

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!