when I use yaml file to deployment pods like this and use command kubectl apply -f xx.yaml
④image : nginx:latest
where does come from this Nginx image?
Is there any official Kubernetes documents about this?
Best Regards
Nginx is a webserver that is used as an example for a pod template here.
nginx:latest
refers to the nginx image on the Docker hub.
The :latest
part refers to which version of nginx to use, in this case it picks the latest version.
You can read more about Kubernetes templates and container here.
The general image name format is <registry>/<image-name>:<tag>
.
Here, nginx:latest
is in format of <image-name>:<tag>
which refers registry is dockerHub. If you want to pull image from any other registry you have to put it in <registry>
section. To learn more about images click here.