Crictl image search?

Something is (purposefully) broken with the following:

$ cat review1.yaml 
apiVersion: v1
kind: Pod
metadata:
  name: break1
spec:
  containers:
  - name: mountain-region
    image: nginx:1.11-apline

and it errs out like so:

$ kubectl create -f review1.yaml                                           
pod/break1 created                                                                             
$ kubectl get po                                                          
NAME     READY   STATUS         RESTARTS   AGE                                                 
break1   0/1     ErrImagePull   0          10s

My initial instinct is that there is something wrong with the image name - so I go about trying to verify that. My guess is that I should be able to query the registry to find valid image names - so I do crictl images --help to find a search option - but turn up nothing.

How do I search the registry for available images?

(Yes, I have identified the ‘s/apline/alpine/’ spelling mistake - but I think my question still has merit.)

crictl is used to interact with the APIs kubernetes uses to talk to container runtimes, which does not include searching.

You can use something like crane ls nginx to find valid tags, but generally identifying images to use is out of scope for kubernetes.

1 Like

Also: While e.g. dockerhub offers a user facing search page online, there is no standard API for searching for images.

Reference: distribution-spec/spec.md at main · opencontainers/distribution-spec · GitHub

1 Like