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.此内容没有您所选择的语言版本。
Chapter 6. Image configuration resources
Use the following procedure to configure image registries.
6.1. Image controller configuration parameters 复制链接链接已复制到粘贴板!
The image.config.openshift.io/cluster
resource offers the following configuration parameters.
Parameter | Description |
---|---|
|
Holds cluster-wide information about how to handle images. The canonical, and only valid name is
|
|
The namespace for this ConfigMap is
|
|
|
| Contains a location of the registry specified by the registry domain name. The domain name might include wildcards.
|
| Holds cluster-wide information about how to handle the registries config.
Only one of |
6.2. Configuring image settings 复制链接链接已复制到粘贴板!
You can configure image registry settings by editing the image.config.openshift.io/cluster
resource. The Machine Config Operator (MCO) watches the `image.config.openshift.io/cluster`for any changes to registries and reboots the nodes when it detects changes.
Procedure
Edit the
image.config.openshift.io/cluster
custom resource:oc edit image.config.openshift.io/cluster
$ oc edit image.config.openshift.io/cluster
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following is an example
image.config.openshift.io/cluster
resource:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
Image
: Holds cluster-wide information about how to handle images. The canonical, and only valid name iscluster
.- 2
allowedRegistriesForImport
: Limits the container image registries from which normal users may import images. Set this list to the registries that you trust to contain valid images, and that you want applications to be able to import from. Users with permission to create images orImageStreamMappings
from the API are not affected by this policy. Typically only cluster administrators will have the appropriate permissions.- 3
additionalTrustedCA
: A reference to a ConfigMap containing additional CAs that should be trusted duringImageStream import
,pod image pull
,openshift-image-registry pullthrough
, and builds. The namespace for this ConfigMap isopenshift-config
. The format of the ConfigMap is to use the registry hostname as the key, and the base64-encoded certificate as the value, for each additional registry CA to trust.- 4
registrySources
: Contains configuration that determines how the container runtime should treat individual registries when accessing images for builds and pods. For instance, whether or not to allow insecure access. It does not contain configuration for the internal cluster registry.- 5
insecureRegistries
: Registries which do not have a valid TLS certificate or only support HTTP connections.- 6
blockedRegistries
: Blacklisted for image pull and push actions. All other registries are allowed.
You can add insecure registries or block any registry by editing the image.config.openshift.io/cluster
custom resource (CR). OpenShift Container Platform applies the changes to this CR to all nodes in the cluster.
Insecure external registries, such as those do not have a valid TLS certificate or only support HTTP connections, should be avoided.
Procedure
Edit the
image.config.openshift.io/cluster
custom resource:oc edit image.config.openshift.io/cluster
$ oc edit image.config.openshift.io/cluster
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following is an example
image.config.openshift.io/cluster
resource:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The Machine Config Operator (MCO) watches the
image.config.openshift.io/cluster
for any changes to registries and reboots the nodes when it detects changes. Changes to the registries appear in the /host/etc/containers/registries.conf file on each node.Copy to Clipboard Copied! Toggle word wrap Toggle overflow