Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
319 views
in Technique[技术] by (71.8m points)

kubernetes - 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?

question from:https://stackoverflow.com/questions/66050568/where-is-the-default-docker-image-registry-when-just-image-name-is-specified-in

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...