That does not create a cert that creates a CSR a certificate signing request which you send to a certificate authority like Let's Encrypt create and actual certificate.
The following instructions create a Certificate Signing Request (CSR) for Kibana. A CSR contains information that a CA uses to generate and sign a security certificate
- Send the
kibana-server.csrcertificate signing request to your internal CA or trusted CA for signing to obtain a signed certificate. The signed file can be in different formats, such as a.crtfile likekibana-server.crt.
So that's not going to work.
You need to create a cert with the cert util you need to use the cert mode not csr mode see here
I have an example here If you are putting both elasticsearch and Kibana on the same host.
https://github.com/bvader/howtos/blob/master/basic-security-elasticsearch/README.md