K8S need to use private repo by default
I'm currently trying to use Nexus Repo by default for Kubernetes. But I have 2 problems. The first one is that if I don't specify the repository, it will directly search on docker.io, despite the fact that I've specified. Also my K8S is using containerd.
/etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["http://192...:8082"]
Furthermore, even when I specify the image with the repository, there seems to be an issue. It's not a connection problem because I was able to ping the repository.
describe of the pod
Events:
│ Type Reason Age From Message
│ ---- ------ ---- ---- -------
│ Normal Pulling 2m17s kubelet Pulling image "repo.mm.mm:8082/nginx:latest"
│ Warning Failed 2m17s kubelet Failed to pull image "repo.mm.mm:8082/nginx:latest": rpc error: code = Unknown desc = failed to pull and unpack image "repo.mm.mm:8082/nginx:latest": failed to resolve reference "repo.mm.mm:8082/nginx:latest": failed to do request: Head "https://repo.mm.mm:8082/v2/nginx/manifests/latest": dial tcp 192...:8082: connect: connection refused
│ Warning Failed 2m17s kubelet Error: ErrImagePull
│ Normal BackOff 2m17s kubelet Back-off pulling image "repo.mm.mm:8082/nginx:latest"
│ Warning Failed 2m17s kubelet Error: ImagePullBackOff
│ Normal Scheduled 2s default-scheduler Successfully assigned default/ng-test to worker1
If anyone has encountered a similar issue or has any suggestions for resolving these problems, your assistance would be highly appreciated. Thank you in advance!