Question

Trouble configuring Traefik ingress controller (terraform + k8s + helm + lets encrypt)

I am using terraform to manage my DO k8s cluster. I have installed Traefik ingress controller and cert-manager using Helm.

However, instead of using a LoadBalancer type service for the Traefik ingress controller, I want to define my own lb in Digital Ocean using the “digitalocean_loadbalancer” resource to prevent it changing ip address every time I update the service, and this way I can also manage the domain using a “digitalocean_domain” resource in terraform and link it to the ip of the load balancer.

However, this is not working as I expect. I have configured Traefik through Helm as follow:

resource "helm_release" "traefik" {
  name       = "traefik"
  repository = "https://traefik.github.io/charts"
  chart      = "traefik"
  namespace  = "traefik"
  version    = "v21.0.0"

  set {
    name  = "ports.web.redirectTo"
    value = "websecure"
  }

  set {
    name  = "service.type"
    value = "NodePort"
  }

  set {
    name  = "ports.web.nodePort"
    value = "30080"
  }

  set {
    name  = "ports.websecure.nodePort"
    value = "30443"
  }
}

This results in the following service being created:

k8s traefik service
k8s traefik service

I have the LB configured as follows:

DO LB settings
DO LB settings

However, when I perform a curl command I get the following response:

curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to my.domain:443

Can anyone tell me if I am doing this correctly and what can cause this error?

Thanks in advance!


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

[SOLVED]

This was due to a typo

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel