Home > Software engineering >  K8s nginx ingress controller: error: error parsing deploy-tls-termination.yaml: error converting YAM
K8s nginx ingress controller: error: error parsing deploy-tls-termination.yaml: error converting YAM

Time:09-22

I am having issues to setup nginx ingress controller in Kubernetes EKS v 1.20. I am following kubernetes/ingress-nginx Installation Guide (https://kubernetes.github.io/ingress-nginx/deploy/#aws) and trying to setup TLS termination in AWS ELB using template below:

wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.0/deploy/static/provider/aws/deploy-tls-termination.yaml

I have replaced attributes below to their corresponding value:

VPC CIDR in use for the Kubernetes cluster:

proxy-real-ip-cidr: XXX.XXX.XXX/XX

AWS Certificate Manager (ACM) ID
arn:aws:acm:us-west-2:XXXXXXXX:certificate/XXXXXX-XXXXXXX-XXXXXXX-XXXXXXXX

But when I deploy the manifest I get error below:

error: error parsing deploy-tls-termination.yaml: error converting YAML to JSON: yaml: line 20: mapping values are not allowed in this context

Y checked the sintax using yamllint and this is the result:

yamllint deploy-tls-termination.yaml 
deploy-tls-termination.yaml
  45:21     error    syntax error: mapping values are not allowed here (syntax)
  273:81    error    line too long (90 > 80 characters)  (line-length)
  274:81    error    line too long (142 > 80 characters)  (line-length)
  336:81    error    line too long (131 > 80 characters)  (line-length)
  476:81    error    line too long (82 > 80 characters)  (line-length)
  517:81    error    line too long (86 > 80 characters)  (line-length)
  591:81    error    line too long (84 > 80 characters)  (line-length)
  621:81    error    line too long (139 > 80 characters)  (line-length)
  641:81    error    line too long (84 > 80 characters)  (line-length)
  671:81    error    line too long (139 > 80 characters)  (line-length)

I can´t figure out how to solve it. Any ideas?

CodePudding user response:

There was an extra space in the manifest. Fix: https://github.com/kubernetes/ingress-nginx/pull/7654

  • Related