Files
doc-exports/docs/cce/umn/cce_faq_00199.html
qiujiandong1 bfc6e41869 CCE UMN update 20241130 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2025-02-24 12:45:02 +00:00

21 lines
2.6 KiB
HTML

<a name="cce_faq_00199"></a><a name="cce_faq_00199"></a>
<h1 class="topictitle1">What Is the Image Pull Policy for Containers in a CCE Cluster?</h1>
<div id="body1577936844858"><p id="cce_faq_00199__p76381937113517">A container image is required to create a container. Images may be stored locally or in a remote image repository.</p>
<p id="cce_faq_00199__p77311459225">The <strong id="cce_faq_00199__b821883512504">imagePullPolicy</strong> field in the Kubernetes configuration file is used to describe the image pull policy. This field has the following value options:</p>
<ul id="cce_faq_00199__ul05715584262"><li id="cce_faq_00199__li1857135812619"><strong id="cce_faq_00199__b168541131536">Always</strong>: Always force a pull.<pre class="screen" id="cce_faq_00199__screen10196102610290">imagePullPolicy: Always</pre>
</li><li id="cce_faq_00199__li75715816266"><strong id="cce_faq_00199__b59311148222">IfNotPresent</strong>: The image is pulled only if it is not already present locally.<pre class="screen" id="cce_faq_00199__screen5662138152915">imagePullPolicy: IfNotPresent</pre>
</li><li id="cce_faq_00199__li185765817266"><strong id="cce_faq_00199__b95941012172212">Never</strong>: The image is assumed to exist locally. No attempt is made to pull the image.<pre class="screen" id="cce_faq_00199__screen7873555122914">imagePullPolicy: Never</pre>
</li></ul>
<p id="cce_faq_00199__p1483514443220"><strong id="cce_faq_00199__b192431819172314">Description</strong></p>
<ol id="cce_faq_00199__ol14506144973613"><li id="cce_faq_00199__li9506104973614">If this field is set to <strong id="cce_faq_00199__b01513415222">Always</strong>, the image is pulled from the remote repository each time a container is started or restarted.<p id="cce_faq_00199__p118935411365">If <strong id="cce_faq_00199__b1254091092419">imagePullPolicy</strong> is left blank, the policy defaults to <strong id="cce_faq_00199__b1084193903117">Always</strong>.</p>
</li><li id="cce_faq_00199__li1550664918368">If the policy is set to <strong id="cce_faq_00199__b71186233338">IfNotPreset</strong>:<ol type="a" id="cce_faq_00199__ol62779419385"><li id="cce_faq_00199__li14941757143716">When the required image does not exist locally, it will be pulled from the remote repository.</li><li id="cce_faq_00199__li164949577370">When the content, except the tag, of the required image is the same as that of the local image, and the image with that tag exists only in the remote repository, Kubernetes will not pull the image from the remote repository.</li></ol>
</li></ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_faq_00186.html">Others</a></div>
</div>
</div>