Configure TLS and CA Certificates
Virtual Machine Orchestrator (VMO) pack version 4.10.x and later uses two separate certificate settings. You can configure each one on its own.
| Setting | Purpose | Pack Values |
|---|---|---|
| Serving certificate | The TLS certificate that VMO Manager presents to browsers and other clients that connect to the VMO UI. | vmo-manager.tls.* |
| Trusted CA bundle | Additional certificate authorities (CAs) that VMO Manager trusts when it connects to other services over HTTPS, such as the OpenID Connect (OIDC) identity provider (IdP) that it uses for sign-in. | vmo-manager.caCert.* |
Pack version 4.9.x and earlier configures certificates differently. If your cluster runs one of those versions, refer to Configure Private CA Certificate.
Prerequisites
-
A workload cluster with VMO pack version 4.10.x or later deployed. Refer to Create a VMO Profile for guidance.
-
Kubectl installed and access to the kubeconfig file for the VMO cluster. Refer to the Kubectl guide to learn how to set up
kubectland get the kubeconfig file. Export its path so that the commands on this page can use it, and run the commands in the same terminal session.export KUBECONFIG="<path-to-kubeconfig>"Replace
<path-to-kubeconfig>with the path to the kubeconfig file of your VMO cluster.
Use Your Own Serving Certificate
In Direct mode, users reach the VMO UI through a LoadBalancer or NodePort
Service, and VMO Manager serves TLS itself. By default, Direct mode issues a self-signed certificate that covers
only the in-cluster Service names, so browsers display a certificate warning. Use a certificate that your users'
browsers trust instead.
In Proxied mode, only the in-cluster Spectro Proxy uses the serving certificate, so you do not need to replace it.
-
Obtain a TLS certificate and its private key in PEM format. The certificate's Subject Alternative Names (SANs) must include the DNS name or IP address of the VMO UI. This is the address in
charts.virtual-machine-orchestrator.vmo-manager.platform.baseUrl. If an intermediate CA signed the certificate, append the intermediate certificates to the certificate file so that clients receive the full chain. -
Create a Secret of type
kubernetes.io/tlsin thevm-dashboardnamespace that holds the certificate and the private key.kubectl create secret tls vmo-tls \
--cert=<path-to-certificate> \
--key=<path-to-private-key> \
--namespace vm-dashboardReplace
<path-to-certificate>with the path to the certificate file, and<path-to-private-key>with the path to the private key file.Example Outputsecret/vmo-tls created -
Log in to Palette.
-
From the left main menu, select Clusters, and then select your VMO cluster.
-
Select the Profile tab, select the Virtual Machine Orchestrator layer, and then select Values. The values editor appears.
-
Set
charts.virtual-machine-orchestrator.vmo-manager.tls.existingSecretto the name of the Secret that you created in step 2. In Custom mode, also settls.enabledtotrue, because TLS is off in the pack's base values. The Proxied and Direct modes set it for you.Examplecharts:
virtual-machine-orchestrator:
vmo-manager:
tls:
enabled: true
existingSecret: "vmo-tls" -
(Custom mode only) If
tls.certManager.enabledistrue, set it tofalseso that the cluster does not switch back to cert-manager if you removeexistingSecretlater. -
Select Save. Wait for Palette to complete the cluster update.
Validate
-
Confirm that the VMO Manager pod reports a
Runningstatus.kubectl get pods --namespace vm-dashboard --selector app.kubernetes.io/name=vmo-manager -
Open the VMO UI in a browser at the address in
vmo-manager.platform.baseUrl. The browser does not display a certificate warning, and the certificate details show your certificate's subject and issuer.
Trust a Private Certificate Authority
VMO Manager trusts the CAs in its container image, the CA of its Kubernetes cluster, and the CAs in the ca.crt key of
the platform-ca-cert ConfigMap in the vm-dashboard namespace. Palette does not create or manage this ConfigMap, so
you create it yourself. VMO Manager reads the ConfigMap only when it starts.
In Custom mode, you can store the CAs in a ConfigMap with a different name. Set
charts.virtual-machine-orchestrator.vmo-manager.caCert.configMapName to the ConfigMap name and
charts.virtual-machine-orchestrator.vmo-manager.caCert.key to the key that holds the CAs, and use those names in the
following steps. Leave charts.virtual-machine-orchestrator.vmo-manager.caCert.enabled at its default, true.
If a private CA signed the certificate of your OIDC IdP, such as a self-hosted Palette or Palette VerteX instance, add
that CA to the ConfigMap. Without it, VMO Manager cannot reach the IdP, and the VMO Manager pod restarts with a
Failed to initialize OIDC provider error that includes x509: certificate signed by unknown authority.
-
Export the DNS name of your IdP, without the
https://prefix. For a self-hosted Palette or Palette VerteX IdP, use the DNS name of the instance.export IDP_DNS_NAME="<idp-dns-name>"Replace
<idp-dns-name>with the DNS name of your IdP, such aspalette.example.com. -
Extract the certificate chain that the IdP presents.
openssl s_client -connect $IDP_DNS_NAME:443 -showcerts </dev/null \
| awk '/BEGIN CERTIFICATE/,/END CERTIFICATE/' > idp-chain.pem -
Split the chain into one file per certificate. The command creates files named
cert-<number>.pem.awk 'BEGIN {c=0;} /BEGIN CERTIFICATE/ {out=sprintf("cert-%02d.pem", c++);} {print > out}' idp-chain.pem -
Display the issuer and subject of each certificate.
for f in cert-*.pem; do echo "$f:" && openssl x509 -noout -issuer -subject < "$f" && echo; doneExample Outputcert-00.pem:
issuer=C=US, O=Example Corp, CN=Example Intermediate CA
subject=CN=palette.example.com
cert-01.pem:
issuer=C=US, O=Example Corp, CN=Example Root CA
subject=C=US, O=Example Corp, CN=Example Intermediate CA -
Save the root CA certificate to a file named
root-ca.pem. A root CA certificate is self-signed, so its issuer and subject match. Servers often leave the root CA out of the chain that they present. If no certificate in the output is self-signed, as in the example output, get the root CA certificate from your certificate administrator. In the example output, the issuer of the last certificate,Example Root CA, is the root CA to ask for.cp <root-ca-file> root-ca.pemReplace
<root-ca-file>with the path to the root CA certificate file, either the self-signedcert-<number>.pemfile from step 4 or the file from your certificate administrator. -
Check whether the
platform-ca-certConfigMap already exists, for example because you added another CA earlier.kubectl get configmap platform-ca-cert --namespace vm-dashboardIf the ConfigMap does not exist, the output contains
NotFound, and you can skip step 7.Example OutputError from server (NotFound): configmaps "platform-ca-cert" not found -
(Existing ConfigMap only) Combine the CAs that the ConfigMap already holds with your root CA, so that VMO Manager keeps trusting them.
kubectl get configmap platform-ca-cert --namespace vm-dashboard --output jsonpath='{.data.ca\.crt}' > ca-bundle.pem
cat root-ca.pem >> ca-bundle.pem -
Create or update the ConfigMap. If you completed step 7, use
ca-bundle.pem. Otherwise, useroot-ca.pem.kubectl create configmap platform-ca-cert \
--from-file=ca.crt=<ca-file> \
--namespace vm-dashboard \
--dry-run=client --output yaml \
| kubectl apply --filename -Replace
<ca-file>withca-bundle.pemorroot-ca.pem. -
Restart VMO Manager so that it reads the updated CAs.
kubectl rollout restart deployment vmo-manager --namespace vm-dashboard
Validate
-
Confirm that the VMO Manager pod reports a
Runningstatus and that its restart count does not increase.kubectl get pods --namespace vm-dashboard --selector app.kubernetes.io/name=vmo-manager -
Review the VMO Manager logs.
kubectl logs --namespace vm-dashboard --selector app.kubernetes.io/name=vmo-manager --tail=50The logs do not contain
could not read CA file,no valid certs found, orFailed to initialize OIDC provider. -
Log in to the VMO UI through your IdP.
Next Steps
To learn how each deployment mode sets the tls.* and caCert.* values, refer to
Deployment Modes. To configure a third-party IdP, refer to
Configure External OIDC.