By Marek
Hello. I have domain registered and pointing at my load balancer. I can access my app using domain name: http://mydomain.com -> this works. Now I would like to add ssl cert for my domain. What I did:
apiVersion: v1
kind: Service
metadata:
name: clinic-serv
annotations:
service.beta.kubernetes.io/do-loadbalancer-certificate-id: "3dda0252-5b19-45e7-9922-b00a6ea29a35"
service.beta.kubernetes.io/do-loadbalancer-name: "clinic-load-balancer"
service.beta.kubernetes.io/do-loadbalancer-protocol: "https"
service.beta.kubernetes.io/do-loadbalancer-certificate-name: "rubinowa"
service.beta.kubernetes.io/do-loadbalancer-disable-lets-encrypt-dns-records: "false"
service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: "true"
Output: http://myDomain.com/ > WORKS
https://myDomain.com/ > DOESNT WORK - I get PR_END_OF_FILE_ERROR in my browser. When I run:
doctl compute load-balancer get 2ebd2163-43b6-43d6-934b-3a9c87cd026e
I get
entry_protocol:tcp,entry_port:80,target_protocol:tcp,target_port:80,certificate_id:,tls_passthrough:false entry_protocol:tcp,entry_port:443,target_protocol:tcp,target_port:443,certificate_id:,tls_passthrough:false
It looks like annotations from my yaml file weren`t applied. What am I missing?
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!
Hi there,
It looks like the load balancer isn’t actually picking up the certificate, since both ports 80 and 443 are still showing as plain TCP with no cert attached.
I’m not 100% sure, but a couple of things you could check: make sure the Service is of type LoadBalancer
, try only specifying either the certificate ID or the certificate name (not both), and confirm that port 443 is exposed and mapped correctly in the Service spec.
If that doesn’t work, it might be worth reaching out to the DigitalOcean support: https://do.co/support
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.