So I was playing with load balancers today, I created one through kubernetes config shown further down. This Load Balancer works correctly, I can access my kubernetes cluster, however I can only do so via http://[my-load-balancer-ip]
I was trying to figure out how to put this load balancer under its own domain and https whole day today, but was empty handed.
I already added my domain to DigitalOcean and it was really easy to point to my load balancers ip. However modern browsers always overwrite http to https so whenever I try to connect I get connection error page.
My only settings in load balancer are forwarding between TCP on port 80 -> TCP on port 30... I tried setting up https and http rules here as well, created new certificate, but still no luck.
Can anyone explain how to set this up and why is this not automatically done, as it is mentioned on https://www.digitalocean.com/products/load-balancer page.
apiVersion: v1
kind: Service
metadata:
labels:
app: my-server
name: my-server
namespace: default
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app: my-server
type: LoadBalancer
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!
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
If you have configured your LoadBalancer correctly, the protocol should be set to HTTP on port 80. Here are a few things you need to check:
Additionally, it’s not typically automatically done because every setup is unique and might require different configurations.
A detailed step-by-step guide on how to set this up can be found at this link.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.