This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.2.5. Configuring additional trust stores for image registry access
The image.config.openshift.io/cluster
custom resource can contain a reference to a config map that contains additional certificate authorities to be trusted during image registry access.
Prerequisites
- The certificate authorities (CA) must be PEM-encoded.
Procedure
You can create a config map in the openshift-config
namespace and use its name in AdditionalTrustedCA
in the image.config.openshift.io
custom resource to provide additional CAs that should be trusted when contacting external registries.
The config map key is the host name of a registry with the port for which this CA is to be trusted, and the base64-encoded certificate is the value, for each additional registry CA to trust.
Image registry CA config map example
- 1
- If the registry has the port, such as
registry-with-port.example.com:5000
,:
should be replaced with..
.
You can configure additional CAs with the following procedure.
To configure an additional CA:
oc create configmap registry-config --from-file=<external_registry_address>=ca.crt -n openshift-config
$ oc create configmap registry-config --from-file=<external_registry_address>=ca.crt -n openshift-config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc edit image.config.openshift.io cluster
$ oc edit image.config.openshift.io cluster
Copy to Clipboard Copied! Toggle word wrap Toggle overflow spec: additionalTrustedCA: name: registry-config
spec: additionalTrustedCA: name: registry-config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow