Configure a MarkLogic Cluster with a standard certificate
- Last Updated: April 14, 2026
- 2 minute read
- MarkLogic Server
- Documentation
To configure a MarkLogic Cluster with a standard certificate:
-
Obtain a certificate with a common name matching the hostname of the MarkLogic host. The certificate must be signed by a trusted Certificate Authority (CA). Either a publicly rooted CA or a private CA can be used. This example uses a private CA and a 2-node cluster.
-
Use this script to generate a self-signed CA certificate with openSSL. The script will create
ca-private-key.pemas the CA key andcacert.pemas the private CA certificate:# Generate private key for CA openssl genrsa -out ca-private-key.pem 2048 # Generate the self-signed CA certificate openssl req -new -x509 -days 3650 -key ca-private-key.pem -out cacert.pem -
Use this script to generate a private key and CSR for the
marklogic-0pod. After running the script,tls.keyis generated as a private key and a host certificate for themarklogic-0pod.-
In Kubernetes, the fully qualified domain name (FQDN) of a pod follows this structure:
<pod-name>.<service-name>.<namespace>.svc.cluster.local. -
For example, if the release name in Helm Chart is
marklogic, or the markLogicGroups.name in Operator ismarklogic, then the host name for themarklogic-0pod indefaultnamespace will bemarklogic-0.marklogic.default.svc.cluster.local. -
The host name for the
marklogic-1pod indefaultnamespace will bemarklogic-1.marklogic.default.svc.cluster.local.
Note:
The filename for the private key must be
tls.keyand the filename for host certificate must betls.crt.# Create private key openssl genpkey -algorithm RSA -out tls.key # Create CSR for marklogic-0 # Use marklogic-0.marklogic.default.svc.cluster.local as Common Name(CN) for CSR openssl req -new -key tls.key -out tls.csr # Sign CSR with private CA openssl x509 -req -CA cacert.pem -CAkey ca-private-key.pem -in tls.csr -out tls.crt -days 365 -
-
Use this script to generate secrets for the host certificate and the CA certificate. Repeat these steps to generate the certificate for the
marklogic-1host and create the secretmarklogic-1-cert. After running the script, secrets are created formarklogic-0andmarklogic-1. One secret is also created for the private CA certificate.# Generate Secret for marklogic-0 host certificate kubectl create secret generic marklogic-0-cert --from-file=tls.crt --from-file=tls.key # Generate Secret for private CA certificate kubectl create secret generic ca-cert --from-file=cacert.pem -
Once the certificate is created within Kubernetes secrets, add this section to the
values.yamlfile for Helm Chart andsample.yamlfile for Operator:tls: enableOnDefaultAppServers: true certSecretNames: - "marklogic-0-cert" - "marklogic-1-cert" caSecretName: "ca-cert" -
Follow the instructions in Install the chart.