Questo contenuto non è disponibile nella lingua selezionata.
Chapter 14. Setting up additional trusted certificate authorities for builds
Use the following sections to set up additional certificate authorities (CA) to be trusted by builds when pulling images from an image registry.
The procedure requires a cluster administrator to create a
ConfigMap
ConfigMap
-
The must be created in the
ConfigMapnamespace.openshift-config - is the key in the
domainandConfigMapis the PEM-encoded certificate.value-
Each CA must be associated with a domain. The domain format is .
hostname[..port]
-
Each CA must be associated with a domain. The domain format is
-
The name must be set in the
ConfigMapcluster scoped configuration resource’simage.config.openshift.io/clusterfield.spec.additionalTrustedCA
14.1. Adding certificate authorities to the cluster Copia collegamentoCollegamento copiato negli appunti!
You can add certificate authorities (CA) to the cluster for use when pushing and pulling images with the following procedure.
Prerequisites
-
You must have access to the public certificates of the registry, usually a file located in the
hostname/ca.crtdirectory./etc/docker/certs.d/
Procedure
Create a
in theConfigMapnamespace containing the trusted certificates for the registries that use self-signed certificates. For each CA file, ensure the key in theopenshift-configis the hostname of the registry in theConfigMapformat:hostname[..port]$ oc create configmap registry-cas -n openshift-config \ --from-file=myregistry.corp.com..5000=/etc/docker/certs.d/myregistry.corp.com:5000/ca.crt \ --from-file=otherregistry.com=/etc/docker/certs.d/otherregistry.com/ca.crtUpdate the cluster image configuration:
$ oc patch image.config.openshift.io/cluster --patch '{"spec":{"additionalTrustedCA":{"name":"registry-cas"}}}' --type=merge