liveBook · Manning

Image tag

As explained in Kubernetes for Developers

A version tag is an identifier appended to an image reference to distinguish a particular image version.

An image tag is an identifier appended to an image reference so Docker and a container registry can distinguish and locate a particular image version. Builds may receive random hash-based names, but meaningful tags make images easier to reference. section 3.2.2

Use tags for two related jobs:

  • Identify a version, commonly with a number such as 1, 2, or 2.2.1. section 3.2.2
  • Identify the registry, account, repository, and version required for an upload, such as us-docker.pkg.dev/wdenniss/ts/timeserver:1. section 3.2.2
  • Select a new image for a Kubernetes Deployment; changing the tag from 1 to 2 causes Kubernetes to replace older Pods through its default rolling update strategy. section 3.2.7

Publishing version 1

Set IMAGE_TAG to us-docker.pkg.dev/wdenniss/ts/timeserver:1, tag the local timeserver image with that reference, build or push it, and use the same reference in the deployment configuration. Later, publish version 2 and update the Deployment image. section 3.2.2 section 3.2.7

IMAGE_TAG=us-docker.pkg.dev/wdenniss/ts/timeserver:1
docker tag timeserver $IMAGE_TAG

Shows how to assign a complete registry image tag to a local image before publishing it. section 3.2.2

How Kubernetes for Developers covers it

How deep it goes
Explains naming conventions and rolling updates, but defers detailed rollout strategies and health checks.
Examples
Uses timeserver tags 1 and 2, complete Artifact Registry paths, Docker commands, and Deployment configuration.
What it assumes
Assumes basic Docker image and Kubernetes Deployment familiarity while explaining tag naming from the beginning.
What you can do after
Operate Docker and Kubernetes updates by tagging, pushing, and deploying a specific image version.
How it connects
Connects image tags with container registries, Docker images, Kubernetes Deployments, Pods, and rolling updates.

Also explained in

Compare how 6 books explain image tag →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.