One - One Code All

Blog Content

k8s使用本地镜像

运维   2018-07-20 12:14:34

k8s默认会从远端拉取镜像,其配置参数imagePullPolicy为Always。所以,如果yaml文件中没有定义那就是使用默认的,因此我们可以通过将该参数显示设置为Never或者IfNotPresent,k8s就会从本地拉取镜像了。


containers:
      - name: myweb
        image: myweb-image
        imagePullPolicy: Never



上一篇:mac中pandas安装不成功,报错its parent directory is not owned by the current user
下一篇:Linux软链接的创建、删除和更新

The minute you think of giving up, think of the reason why you held on so long.