docs/doc/source/admintasks/kubernetes/installing-updating-the-docker-registry-certificate.rst
Ron Stone f125a8b892 Remove spurious escapes (r8,dsR8)
This change addresses a long-standing issue in rST documentation imported from XML.
That import process added backslash escapes in front of various characters. The three
most common being '(', ')', and '_'.
These instances are removed.

Signed-off-by: Ron Stone <ronald.stone@windriver.com>
Change-Id: Id43a9337ffcd505ccbdf072d7b29afdb5d2c997e
2023-03-01 11:19:04 +00:00

4.4 KiB
Raw Blame History

Install/Update Local Registry Certificates

Warning

By default a self-signed certificate is generated at installation time for the registry API. This applies to standalone system, central cloud and subclouds of system. For more secure access, it is strongly recommended to update the default self-signed certificate with an intermediate or Root -signed certificate.

The local Docker registry provides secure HTTPS access using the registry API.

The intermediate or Root -signed certificate for the registry must have at least the following : DNS:registry.local, DNS:registry.central, IP Address:<oam-floating-ip-address>, IP Address:<mgmt-floating-ip-address>. Use the system addrpool-list command to get the floating IP Address and management floating IP Address for your system. You can add any additional entry(s) that you have set up for your floating IP Address.

Note

The DNS:registry.central can be omitted from for standalone system and subcloud of system.

The update procedure for any type of system (standalone, central cloud and subcloud of system) is the same.

Use the following procedure to install an intermediate or Root -signed certificate to either replace the default self-signed certificate or to replace an expired or soon to expire certificate.

Obtain an intermediate or Root -signed certificate and key from a trusted intermediate or Root Certificate Authority (). Refer to the documentation for the external Root that you are using, on how to create public certificate and private key pairs, signed by an intermediate or Root , for HTTPS.

For lab purposes, see : Create Certificates Locally using openssl <create-certificates-locally-using-openssl> to create an Intermediate or test Root certificate and key, and use it to sign test certificates.

Put the Privacy Enhanced Mail (PEM) encoded versions of the certificate and key in a single file, and copy the file to the controller host.

Also obtain the certificate of the intermediate or Root CA that signed the above certificate.

Ensure all certificates are valid before starting an upgrade. Run the show-certs.sh script to display an overview of the various certificates that exist in the system along with their expiry date. For more information, see, Display Certificates Installed on a System <utility-script-to-display-certificates>.

  1. In order to enable internal use of the Docker registry certificate, update the trusted list for this system with the Root associated with the Docker registry certificate.

    ~(keystone_admin)]$ system certificate-install --mode ssl_ca <pathTocertificate>

    where:

    <pathTocertificate>

    is the path to the intermediate or Root certificate associated with the Docker registry's intermediate or Root -signed certificate.

  2. Update the Docker registry certificate using the certificate-install command.

    Set the mode (-m or --mode) parameter to docker_registry.

    ~(keystone_admin)]$ system certificate-install --mode docker_registry <pathTocertificateAndKey>

    where:

    <pathTocertificateAndKey>

    is the path to the file containing both the Docker registry's Intermediate or Root -signed certificate and private key to install.

In system, the server certificate of central registry and the server certificate of subclouds local registry can be arranged to be generated from the same root certificate.

In this case, the generated server certificates need to be installed on the central cloud and each of the subclouds.

The root certificate only needs to install on central cloud, the orchestration will sync the root certificate to all the subclouds.

Renew local registry certificates

The local registry certificate is not automatically renewed, user MUST renew the certificate prior to expiry, otherwise a variety of system operations will fail.