Aplica-se a SUSE Telco Cloud 3.6
45 Configuração de registro privado #
Containerd pode ser configurado para se conectar a registros privados e usá-los para extrair imagens privadas em cada nó.
Na inicialização, RKE2 verifica se um arquivo registries.yaml existe em /etc/rancher/rke2/ e instrui containerd a usar quaisquer registros definidos no arquivo. Se você deseja usar um registro privado, crie este arquivo como root em cada nó que usará o registro.
Para adicionar o registro privado, crie o arquivo /etc/rancher/rke2/registries.yaml com o seguinte conteúdo:
mirrors:
docker.io:
endpoint:
- "https://registry.example.com:5000"
configs:
"registry.example.com:5000":
auth:
username: xxxxxx # this is the registry username
password: xxxxxx # this is the registry password
tls:
cert_file: # path to the cert file used to authenticate to the registry
key_file: # path to the key file for the certificate used to authenticate to the registry
ca_file: # path to the ca file used to verify the registry's certificate
insecure_skip_verify: # may be set to true to skip verifying the registry's certificateou sem autenticação:
mirrors:
docker.io:
endpoint:
- "https://registry.example.com:5000"
configs:
"registry.example.com:5000":
tls:
cert_file: # path to the cert file used to authenticate to the registry
key_file: # path to the key file for the certificate used to authenticate to the registry
ca_file: # path to the ca file used to verify the registry's certificate
insecure_skip_verify: # may be set to true to skip verifying the registry's certificatePara que as alterações no registro entrem em vigor, você precisa realizar a configuração deste arquivo antes de iniciar o RKE2 no nó ou reiniciar o RKE2 em cada nó configurado.