Question

Cannot reach my service after 1 terraform apply

I have set up a k8s cluster using terraform, helm, cert-manager, and traefik as ingress controller.

If I perform terraform apply from scratch, all the components start correctly, and I can reach my test web page that uses a valid SSL certificate. Getting to this point took me the better part of past week…

So I finally thought I had figured it out, but I noticed that if I make some changes to the terraform config (for example add a new unrelated k8s deployment) and perform terraform apply again, I can no longer reach my test web page and instead I get curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to mydomain.com:443.

There are no errors in any of the pod logs so I suspect the problem lies somewhere between my Digital Ocean load balancer and my cluster.

An important thing is that I use the service.annotations.kubernetes.digitalocean.com/load-balancer-id-annotation on the traefik deployment so when I start the traefik ingress controller it reuses an existing Digital Ocean load balancer (which I also created with Terraform).

I have no idea where to start debugging since it works correctly after destroying all resources and performing terraform apply for the first time.

Please Help!


Submit an answer
Answer a question...

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.

KFSys
Site Moderator
Site Moderator badge
February 13, 2023

Hey @levissie,

That’s indeed weird however what I can tell is that the issue would be the configuration somewhere rather than with DigitalOcean.

Usually, in such cases the logs will be the best place to look. Check every application’s log that you use, there should be a reason in the logs for the message. It’s quite strange but I can’t think of something else.