码迷,mamicode.com
首页 > 其他好文 > 详细

k8s imagePullPolicy拉取策略

时间:2020-05-25 15:27:21      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:can   any   nbsp   efault   local   cal   span   ESS   speed   

imagePullPolicy

Always

总是拉取 pull

imagePullPolicy: Always

IfNotPresent

默认值,本地有则使用本地镜像,不拉取

imagePullPolicy: IfNotPresent

Never

只使用本地镜像,从不拉取

imagePullPolicy: Never

 

Pre-pulling Images
Note: If you are running on Google Kubernetes Engine, there will already be a .dockercfg on each node with credentials for Google Container Registry. You cannot use this approach.
Note: This approach is suitable if you can control node configuration. It will not work reliably on GCE, and any other cloud provider that does automatic node replacement.
By default, the kubelet will try to pull each image from the specified registry. However, if the imagePullPolicy property of the container is set to IfNotPresent or Never, then a local image is used (preferentially or exclusively, respectively).

If you want to rely on pre-pulled images as a substitute for registry authentication, you must ensure all nodes in the cluster have the same pre-pulled images.

This can be used to preload certain images for speed or as an alternative to authenticating to a private registry.

All pods will have read access to any pre-pulled images

 

k8s imagePullPolicy拉取策略

标签:can   any   nbsp   efault   local   cal   span   ESS   speed   

原文地址:https://www.cnblogs.com/supery007/p/12956680.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!