This is a cache of https://docs.openshift.com/container-platform/4.6/virt/virtual_machines/importing_vms/virt-tls-certificates-for-dv-imports.html. It is a snapshot of the page at 2024-11-22T23:55:25.546+0000.
TLS certificates for data volume imports - Virtual machines | OpenShift Virtualization | OpenShift Container Platform 4.6
×

Adding TLS certificates for authenticating data volume imports

TLS certificates for registry or HTTPS endpoints must be added to a config map in order to import data from these sources. This config map must be present in the namespace of the destination data volume.

Create the config map by referencing the relative file path for the TLS certificate.

Procedure
  1. Ensure you are in the correct namespace. The config map can only be referenced by data volumes if it is in the same namespace.

    $ oc get ns
  2. Create the config map:

    $ oc create configmap <configmap-name> --from-file=</path/to/file/ca.pem>

Example: Config map created from a TLS certificate

The following example is of a config map created from ca.pem TLS certificate.

apiVersion: v1
kind: configmap
metadata:
  name: tls-certs
data:
  ca.pem: |
    -----BEGIN CERTIFICATE-----
    ... <base64 encoded cert> ...
    -----END CERTIFICATE-----