Kind: document kubernetes behavior with image side loading and :latest tag

Created on 22 Feb 2019  路  3Comments  路  Source: kubernetes-sigs/kind

steps to reproduce:
1) build a container with tag: latest,
2) then load into kind, no error reported:
kind load docker-image ###:latest
3) then deploy pod to kind, check pod status, it getting image Pull Error.

it works well with other numeric tag as i tested.
thanks to @BenTheElder to point it out.

kindocumentation prioritimportant-soon

Most helpful comment

/kind documentation
/priority important-soon

work arounds are:

  • don't use a :latest tag
  • specify imagePullPolicy: IfNotPresent or imagePullPolicy: Never on your container(s)

All 3 comments

This is a Kubernetes feature, and we should document it and how to work around:

https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#container-v1-core

imagePullPolicy string | Image pull policy.
One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info:聽
https://kubernetes.io/docs/concepts/containers/images#updating-images

(emphasis mine on Defaults to Always if :latest tag is specified)

/kind documentation
/priority important-soon

work arounds are:

  • don't use a :latest tag
  • specify imagePullPolicy: IfNotPresent or imagePullPolicy: Never on your container(s)

@tao12345666333 documented this 馃檹
https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster

Was this page helpful?
0 / 5 - 0 ratings