Welcome to the Linux Foundation Forum!

Yaml Error - Lab 4.1. Deploy an Ingress Controller

Hello,

I am trying to complete the Lab 4.1. Deploy an Ingress Controller and I am stuck on step 6 where I am supposed to create a Kubernetes manifest that has the Ingress API which contains the name of the Emoji app service.

I am using the attached yaml file but it says

3:11 error syntax error: mapping values are not allowed here (syntax)

Thanks

Answers

  • edreir
    edreir Posts: 7

    attached file is here

  • chrispokorni
    chrispokorni Posts: 2,340

    Hi @edreir,

    It seems the syntax is incorrect. Where there is a key: value entry, there needs to be an empty space between the : and the value.

    Please check the documentation for correct syntax:
    https://kubernetes.io/docs/concepts/services-networking/ingress/

    Regards,
    -Chris

  • edreir
    edreir Posts: 7

    Hi Chris,

    I did check the syntax and I also installed yamllint that highlights where the error, but I fix one and it points out to another one.

    I was expecting that the example in the Lab to be correct, do you know if/when a correction to the lab instructions will be available? It it pretty time consuming to fix it.

    Thanks

  • chrispokorni
    chrispokorni Posts: 2,340

    Hi @edreir,

    A simple visual check reveals that the lab guide Ingress definition is correct. There may be a chance that the typos have been introduced during copy/paste into the text editor or terminal. Linters are helpful in finding errors in definition manifests, but I would not rely entirely on them to find and fix all errors.

    Since the attached file included several typos, they were highlighted one at a time, until the entire definition file was eventually corrected.

    With this in mind, familiarity with the official Kubernetes documentation is critical, especially when used to validate Kubernetes resource definitions. This is part of the learning process when deploying cloud native applications on this platform.

    Regards,
    -Chris

Categories

Upcoming Training