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

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

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.

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.

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
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.