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?
2
Answers
OK, I was able to specifically confirm from my node based on the container runtime:
docker system info
and look for the image being pulled frommirror.gcr.io
.sudo crictl info
and look for the same as above.It’s coming from docker hub (https://hub.docker.com/) when only image name is specified in the manifest file. Example:
For nginx, it’s coming from official nginx repository (https://hub.docker.com/_/nginx).