Score:0

How can I make Kubernetes use a private repository by default with Nexus and Containerd?

pl flag

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!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.