Closed guyskk closed 1 year ago
I suspect it is a network issue with your k8s cluster, can you check if your cluster can communicate with docker.io with the following command?
kubectl delete pod test-docker-hub
kubectl run test-docker-hub --rm --tty -i --restart='Never' \
--namespace default \
--image yetone/curl \
--command -- sh -c 'TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:yetone/yatai-bentos:pull" | jq -r ".token"); curl -H "Authorization: Bearer $TOKEN" https://index.docker.io/v2/yetone/yatai-bentos/tags/list'
The expected output is:
@yetone
$ kubectl delete pod test-docker-hub
$ kubectl run test-docker-hub --rm --tty -i --restart='Never' \
--namespace default \
--image yetone/curl \
--command -- sh -c 'TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:yetone/yatai-bentos:pull" | jq -r ".token"); curl -H "Authorization: Bearer $TOKEN" https://index.docker.io/v2/yetone/yatai-bentos/tags/list'
Error from server (NotFound): pods "test-docker-hub" not found
If you don't see a command prompt, try pressing enter.
warning: couldn't attach to pod/test-docker-hub, falling back to streaming logs: unable to upgrade connection: container test-docker-hub not found in pod test-docker-hub_default
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4409 0 4409 0 0 13159 0 --:--:-- --:--:-- --:--:-- 13161
{"name":"yetone/yatai-bentos","tags":["yatai.default.iris_classifier.tdldlix5agxoqusu"]}
pod "test-docker-hub" deleted
Hi @yetone , is there any suggestions or updates?
@guyskk Sorry for the late reply, I have already fixed this bug in yatai-deployment, you can upgrade yatai-deployment to v1.0.4
to prevent this bug.
https://github.com/bentoml/yatai-deployment/releases/tag/v1.0.4
Thank you very much!
Hi, I follow the guide https://docs.bentoml.org/projects/yatai/en/latest/installation/yatai_deployment.html#prepare-container-registry and use docker.io for container registry.
For the
DOCKER_REGISTRY_SERVER
config, I have trydocker.io
,index.docker.io
,index.docker.io/v1
,https://index.docker.io/v1
and all not works. I checkeddocker login index.docker.io
success in my local env.Could you help me?
The logs of yatai-deployment:
kubectl -n yatai-deployment logs -f deploy/yatai-deployment