dockerhub in kubernetes give unauthorized: incorrect username or password with right credentials dockerhub in kubernetes give unauthorized: incorrect username or password with right credentials kubernetes kubernetes

dockerhub in kubernetes give unauthorized: incorrect username or password with right credentials


I found a solution, apparently the problem is that docker hub use different domains for login and containers pulling, so you must edit your secret created with the kubectl command and replace the base64 of .dockerconfigjson with an encoded base64 version of this json (yeah I know maybe I added too much domain but I'm trying to fix this sh*t from about 2 days I don't have patience anymore to find the exact ones)

{    "auths":{        "https://index.docker.io/v1/":{            "username":"user",            "password":"password",            "email":"yourdockeremail@gmail.com",            "auth":"base64 of string user:password"        },        "auth.docker.io":{            "username":"user",            "password":"password",            "email":"yourdockeremail@gmail.com",            "auth":"base64 of string user:password"        },        "registry.docker.io":{            "username":"user",            "password":"password",            "email":"yourdockeremail@gmail.com",            "auth":"base64 of string user:password"        },        "docker.io":{            "username":"user",            "password":"password",            "email":"yourdockeremail@gmail.com",            "auth":"base64 of string user:password"        },        "https://registry-1.docker.io/v2/": {            "username":"user",            "password":"password",            "email":"yourdockeremail@gmail.com",            "auth":"base64 of string user:password"        },        "registry-1.docker.io/v2/": {            "username":"user",            "password":"password",            "email":"yourdockeremail@gmail.com",            "auth":"base64 of string user:password"        },        "registry-1.docker.io": {            "username":"user",            "password":"password",            "email":"yourdockeremail@gmail.com",            "auth":"base64 of string user:password"        },        "https://registry-1.docker.io": {            "username":"user",            "password":"password",            "email":"yourdockeremail@gmail.com",            "auth":"base64 of string user:password"        }    }}