Adding SSL certificate and key to couchbase server

I’m trying to add SSL to an enterprise couchbase server container instance running on a Kubernetes cluster locally. I’m using the code below:

curl -u ${username}:${password} -v -X POST --data-binary “…/dev-ssl/certificate.pem” http://${couchbaseServerHost}:8091/controller/uploadClusterCA
curl -u ${username}:${password} -v -X POST --data-binary “…/dev-ssl/key.pem” http://${couchbaseServerHost}:8091/controller/uploadClusterCA

I’m getting error saying: {“error”:“Malformed certificate”}

What am i doing wrong? Is it expecting a .pem format? If not what format should it be in?

Thanks