You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An `image` volume source represents an OCI object (a container image or
551
+
artifact) pulled and mounted on the kubelet's host machine. The volume is
552
+
resolved at pod startup depending on which PullPolicy value is provided:
553
+
554
+
- `Always`: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails.
555
+
- `Never`: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present.
556
+
- `IfNotPresent`: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.
557
+
558
+
The volume gets re-resolved if the pod gets deleted and recreated, which means
559
+
that new remote content will become available on pod recreation. A failure to
560
+
resolve or pull the image during pod startup will block containers from starting
561
+
and may add significant latency. Failures will be retried using normal volume
562
+
backoff and will be reported on the pod reason and message. The types of objects
563
+
that may be mounted by this volume are defined by the container runtime
564
+
implementation on a host machine and at minimum must include all valid types
565
+
supported by the container image field. The OCI object gets mounted in a single
566
+
directory (`spec.containers[*].volumeMounts.mountPath`) by merging the manifest
567
+
layers in the same way as for container images. The volume will be mounted
568
+
read-only (`ro`) and non-executable files (`noexec`). Sub path mounts for
569
+
containers are not supported (`spec.containers[*].volumeMounts.subpath`). The
570
+
field `spec.securityContext.fsGroupChangePolicy` has no effect on this volume
571
+
type. The [`AlwaysPullImages` Admision Controller](/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)
572
+
does also work for this volume source like for container images.
573
+
574
+
The following fields are available for the `ImageVolumeSource` type:
575
+
576
+
- `reference`: Image or artifact reference to be used.
577
+
Behaves in the same way as `pod.spec.containers[*].image`.
578
+
Pull secrets will be assembled in the same way as for the container image by
579
+
looking up node credentials, SA image pull secrets, and pod spec image pull
580
+
secrets. This field is optional to allow higher level config management to
581
+
default or override container images in workload controllers like
582
+
Deployments and StatefulSets.
583
+
584
+
[More info about container images](/docs/concepts/containers/images)
585
+
586
+
- `pullPolicy`: Policy for pulling OCI objects. Possible values are: `Always`,
587
+
`Never`or `IfNotPresent`. Defaults to `Always` if `:latest` tag is
588
+
specified, or `IfNotPresent` otherwise.
589
+
590
+
See the [Use an Image Volume With a Pod](docs/tasks/configure-pod-container/image-volumes)
591
+
example for more details on how to use the volume source.
592
+
546
593
### iscsi
547
594
548
595
An `iscsi` volume allows an existing iSCSI (SCSI over IP) volume to be mounted
0 commit comments