Rubans
Rubans

Reputation: 4488

Where is the default docker image registry when just image name is specified in a manifest?

When my yaml is something like this :

apiVersion: v1
kind: Pod
metadata:
  name: task-pv-pod
spec:
  volumes:
    - name: task-pv-storage
      persistentVolumeClaim:
        claimName: task-pv-claim
  containers:
    - name: task-pv-container
      image: nginx
      ports:
        - containerPort: 80
          name: "http-server"
      volumeMounts:
        - mountPath: "/usr/share/nginx/html"
          name: task-pv-storage

Where is the nginx image coming from? for e.g. in GKE Kubernetes world, if I was going to reference an image from registry it's normally something like this:

image: gsr.io.foo/nginx

but in this case it's just an image name:

image: nginx

So trying to just understand where the source registry is on when deployed on a K8 cluster as it seems to pull down ok but just want to know how I can figure out where it's supposed to come from?

Upvotes: 0

Views: 207

Answers (2)

Rubans
Rubans

Reputation: 4488

OK, I was able to specifically confirm from my node based on the container runtime:

  1. If your nodepool is running docker, you may run docker system info and look for the image being pulled from mirror.gcr.io.
  2. If your nodepool is running containerd, you may run sudo crictl info and look for the same as above.

Upvotes: 0

Pulak Kanti Bhowmick
Pulak Kanti Bhowmick

Reputation: 1255

It's coming from docker hub (https://hub.docker.com/) when only image name is specified in the manifest file. Example:

...
Containers:
  - name: nginx
    image: nginx
...

For nginx, it's coming from official nginx repository (https://hub.docker.com/_/nginx).

Upvotes: 3

Related Questions