SCDF unable to read application properties from image in local registry: Error: "Could not find a registry configuration for <private-reg:port>"

1/23/2022

Running SCDF in a local bare metal kubernetes cluster. Able to register and run task apps from both the public and private docker registry (at hub.docker.com). I re-tagged and pushed the images to a private local registry. But when I register them now, SCDF is unable to read the image metadata label for the application properties. The app runs fine though in the cluster using the imagePullSecret for the local registry. SCDF logs have the following error:

2022-01-23 02:04:25.850  WARN 1 --- [nio-8080-exec-4] ApplicationConfigurationMetadataResolver : Failed to retrieve properties for resource Docker Resource [docker:172.16.16.51:5000/timestamp-task:v1] because of ContainerRegistryException: Could not find an Registry Configuration for: 172.16.16.51:5000

I did the following based on the documentation for private registry.

  1. Create a secret for the local registry:

    kubectl create secret docker-registry myregcred --docker-server=172.16.16.51:5000 --docker-username=<reguser> --docker-password=<regpwd> --docker-email=<email>

  2. Mount the secret to the SCDF container as a file. I verified the secret myregcred was mounted. The /etc/secrets/myregcred directory in the SCDF pod had the key file .dockerconfigjson

  3. Disabled SSL verification by providing a registry configuration override (since registry is self signed)

      ...
      container:
        registry-configurations:
          myregistry:
            disable-ssl-verification: true
            registry-hostname: 172.16.16.51:5000
      ...
  4. Registered the app in the SCDF dashboard UI with URI:

     docker:172.16.16.51:5000/timestamp-task:v1

I understand the registry configuration is inferred by SCDF based on the mounted secret. So not sure why I am getting this error. The same secret myregcred is being used as the imagePullSecret and the image gets pulled from local registry and app runs fine. Appreciate any thoughts. thanks.

-- vrajkuma
docker
kubernetes
spring-cloud-dataflow
spring-cloud-deployer-kubernetes
spring-cloud-task

0 Answers