Cannot add external certificate generated from cloudflare to certificate list

I cannot add external certificate generated from cloudflare to certificates list.

The tutorial at doesn’t give enough information about the specs for the certificate and private key fields input.

the certificate from cloudflare contains two information: the certificate itself and the private key

certificate format is: -----BEGIN CERTIFICATE----- #certificate_contents -----END CERTIFICATE-----

private key format is: -----BEGIN PRIVATE KEY----- #private_keys_contents -----END PRIVATE KEY-----

I tried every combination of ways but to no avail.

When I try copying the #certificate_contents into the digital ocean input form labeled “certificate”, I get an error of “not a valid certificate”

When I try copying the whole thing (-----BEGIN…END-----) into the both fields accordingly, no error but when I submit, it returns “either certificate or private key is not a valid PEB block”

Does anyone have this same problem?

What im trying to do is basically provide a secure connection to my kubernetes cluster which is now load balanced using a load balancer from DO. I’ve read the tutorial at which points me to add an certificate annotation inside the service yaml file which requires an ID that is provided from a certificate which I will list in the settings > security > certificates. hence, the question.


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

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.

Not exactly what you’re looking for, but I recently figured out how to create kubernetes certs from Let’s Encrypt PEM files:

I create certs with this command:

kubectl create secret tls [your-cert-name] --cert=fullchain.pem --key=privkey.pem

I’m not sure about services, but I add the certificate to my ingress yaml definition.

It looks something like this:

kind: Ingress
  name: hello-ingress
  annotations: "nginx" "letsencrypt-prod"
  - hosts:
    secretName: hello-tls
  - host:
      - backend:
          serviceName: hello-world
          servicePort: 80