I am trying to deploy apps into an Openshift cluster (using oc apply -f <deployment-file-name>.yaml
), which involves pulling an image from a privately-hosted registry, and I'm running into the problem in the title. I am logged into the cluster and using oc
command line tools on a bastion host, which is the only host in the cluster that is not air-gapped.
A few attempted fixes that haven't worked:
- Getting a certificate (call it
ca.crt
) signed by the company I work for using an internal tool, generating a file in the format.pem
(call itperm.pem
) via the commandopenssl x509 -in ca.crt -out perm.pem
, puttingca.crt
into/etc/docker/certs.d/<address-of-registry-hosting-machine>:<port>/
on the bastion host, and running the private registry with the command that matches the certificate (ca.crt
) and its key to theREGISTRY_HTTP_TLS_CERTIFICATE
andREGISTRY_HTTP_TLS_KEY
env. variables respectively (as demo'ed in the docker docs). - Placing
"insecure-registries":["<address-of-registry-hosting-machine>:<port>"]
into the file/etc/docker/daemon.json
file on the bastion host - Creating a configuration map, as instructed here on section 2.5, and modifying the deployment YAML file to contain certificate contents (I tried all possible permutations of certificate contents, i.e. with and without root and intermediate certificates).
Does anyone know what else I could do to have deployments from the bastion host overcome the error?