https://rancher.com/ logo
Title
p

plain-whale-39460

08/08/2022, 2:47 PM
Hello, I'm trying to put imagescan for the private docker hub image by mentioning the
secretRef
in fleet.yaml,
secretRef:
  name: docker-hub
Using registry-creds to sync the secret named
docker-hub
across namespace which has the auth to pull private image. I'm able to pull the docker image using the registry-cred's
docker-hub
secret, but getting this error
ImageScan develop is not ready: auth for "<http://index.docker.io|index.docker.io>" not found in secret fleet-default/docker-hub
a

ambitious-plastic-3551

08/09/2022, 5:19 AM
How did you create a secret?
p

plain-whale-39460

08/09/2022, 5:54 AM
Honestly I don't remember, as we've manifest file of the secret and we pass this secret to registry-creds which creates this secret in all namespaces, but at first I probably created the secret using this command,
kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>
stringdata of the secret,
stringData:
  .dockerconfigjson: '{"auths":{"<https://index.docker.io/v1/>":{"username":"username","password":"password","email":"email","auth":"auth"}}}'
type: <http://kubernetes.io/dockerconfigjson|kubernetes.io/dockerconfigjson>
a

ambitious-plastic-3551

08/10/2022, 4:37 AM
I think /v1 is the factor, normally you do only up to the root
p

plain-whale-39460

08/10/2022, 6:39 AM
I tried with that, but getting same error.
f

fast-helmet-86447

11/07/2022, 1:56 AM
Worked for me with removing the "auths"
{"index.docker.io":{UserAndPassword}