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
Copy file name to clipboardExpand all lines: content/en/docs/concepts/containers/images.md
+24-6Lines changed: 24 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,17 +33,35 @@ Container images are usually given a name such as `pause`, `example/mycontainer`
33
33
Images can also include a registry hostname; for example: `fictional.registry.example/imagename`,
34
34
and possibly a port number as well; for example: `fictional.registry.example:10443/imagename`.
35
35
36
-
If you don't specify a registry hostname, Kubernetes assumes that you mean the Docker public registry.
36
+
If you don't specify a registry hostname, Kubernetes assumes that you mean the [Docker public registry](https://hub.docker.com/).
37
+
You can change this behaviour by setting default image registry in [container runtime](/docs/setup/production-environment/container-runtimes/) configuration.
37
38
38
-
After the image name part you can add a _tag_ (in the same way you would when using with commands
39
-
like `docker` or `podman`). Tags let you identify different versions of the same series of images.
39
+
After the image name part you can add a _tag_ or _digest_ (in the same way you would when using with commands
40
+
like `docker` or `podman`). Tags let you identify different versions of the same series of images.
41
+
Digests are a unique identifier for a specific version of an image. Digests are hashes of the image's content,
42
+
and are immutable. Tags can be moved to point to different images, but digests are fixed.
40
43
41
44
Image tags consist of lowercase and uppercase letters, digits, underscores (`_`),
42
-
periods (`.`), and dashes (`-`).
43
-
There are additional rules about where you can place the separator
44
-
characters (`_`, `-`, and `.`) inside an image tag.
45
+
periods (`.`), and dashes (`-`). It can be up to 128 characters long. And must follow the
46
+
next regex pattern: `[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}`
47
+
You can read more about and find validation regex in the
48
+
[OCI Distribution Specification](https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#workflow-categories).
45
49
If you don't specify a tag, Kubernetes assumes you mean the tag `latest`.
46
50
51
+
Image digests consists of a hash algorithm (such as `sha256`) and a hash value. For example:
Some image name examples that Kubernetes can use are:
57
+
58
+
-`busybox` - Image name only, no tag or digest. Kubernetes will use Docker public registry and latest tag. (Same as `docker.io/library/busybox:latest`)
59
+
-`busybox:1.32.0` - Image name with tag. Kubernetes will use Docker public registry. (Same as `docker.io/library/busybox:1.32.0`)
60
+
-`registry.k8s.io/pause:latest` - Image name with a custom registry and latest tag.
61
+
-`registry.k8s.io/pause:3.5` - Image name with a custom registry and non-latest tag.
62
+
-`registry.k8s.io/pause@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07` - Image name with digest.
63
+
-`registry.k8s.io/pause:3.5@sha256:1ff6c18fbef2045af6b9c16bf034cc421a29027b800e4f9b68ae9b1cb3e9ae07` - Image name with tag and digest. Only digest will be used for pulling.
64
+
47
65
## Updating images
48
66
49
67
When you first create a {{< glossary_tooltip text="Deployment" term_id="deployment" >}},
0 commit comments