This is a cache of https://docs.openshift.com/container-platform/4.4/cnv/cnv_virtual_machines/cnv_importing_vms/cnv-tls-certificates-for-dv-imports.html. It is a snapshot of the page at 2024-11-21T01:20:59.100+0000.
TLS certificates for DataVolume imports - Virtual machines | Container-native virtualization | OpenShift Container Platform 4.4
×

Adding TLS certificates for authenticating DataVolume imports

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

Create the configmap by referencing the relative file path for the TLS certificate.

Procedure
  1. Ensure you are in the correct namespace. The configmap can only be referenced by DataVolumes if it is in the same namespace.

    $ oc get ns
  2. Create the configmap:

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

Example: configmap created from a TLS certificate

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

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