Docker Community Forums

Share and learn in the Docker community.

Unable to use non-DTR registry authentication


(Kcmastrpc) #1

I’m attempting to deploy a ReplicaSet using an external registry (gitlab) that has authentication enabled. I’ve created the docker-registry secret, it matches up with ~/.docker/config.json but I get back the following error when applying the template:

kubectl apply -f kube.yml    
service "single-database-mysql" unchanged
persistentvolumeclaim "db-single-database-mysql-0" unchanged
persistentvolume "db-single-database-mysql" configured
Error from server (InternalError): error when creating "kube.yml": Internal error occurred: UCP DCT image resolve request returned status 400

googling this has a net zero result, so I’m assuming that UCP DCT means Universal Control Plane Docker Content Trust

I do not have content trust enabled for this cluster, so I’m just wondering if this is a bug or if I’m doing something wrong.

# i've tried:
# https://registry.private.co/v1
# https://registry.private.co/v2
# https://registry.private.co
# registry.private.co
# registry.private.co/v1 ... etc
kubectl create secret docker-registry regcred --docker-server=registry.private.co --docker-username=validUser --docker-password=validPassword --docker-email=nobody@private.co

kube.yml

    spec:
      containers:
      - image: registry.private.co/singlemusic/single-database-mysql:latest
        imagePullPolicy: Always
        name: single-database-mysql
      ...
      imagePullSecrets:
      - name: regcred

(Kcmastrpc) #2

after i restarted the kube-api this started working. i believe it’s because i ran UCP on the non-default port.