k8s-docker-registry-cache-bypass

Replace image tags with digests in Kubernetes deployment manifests.

5|Updated Feb 7, 2021
One-click install
npx skills add https://github.com/ViktorBarzin/infra --skill k8s-docker-registry-cache-bypass
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-docker-registry-cache-bypass
Source: https://github.com/ViktorBarzin/infra/tree/main/.claude/skills/k8s-docker-registry-cache-bypass
Command: npx skills add https://github.com/ViktorBarzin/infra --skill k8s-docker-registry-cache-bypass

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kubernetes pods run the wrong image version even after pushing new images with the same tag, due to local registry mirrors caching layers.

Core Features & Use Cases

  • Digest-based pulls: replace image tags with digests to ensure the exact image version is used.
  • Deployment updates: modify deployments and manifests to reference the digest instead of a mutable tag.
  • Verification workflow: validate that pods are running the new image and behavior after rollout.

Quick Start

Push the image, obtain its digest, and update your deployment to reference the digest and restart the deployment.

Frequently Asked Questions about k8s-docker-registry-cache-bypass

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does Kubernetes pull the wrong image version after pushing a new image with the same tag?

Local registry mirrors cache image layers, causing Kubernetes to ignore repeated pushes using the same tag. Bypass this cache by referencing the image digest instead of the mutable tag in your deployment manifests.

How do I bypass the Kubernetes image cache using image digests?

To bypass the Kubernetes image cache, push your image, obtain its specific digest, and update your deployment manifests and Terraform or K8s configurations to reference that exact digest. Restart the deployment to ensure the exact image version is used.

Does setting imagePullPolicy: Always force Kubernetes to bypass local registry mirror cache?

Setting imagePullPolicy: Always can fail to refresh the image when local registry mirrors are involved. Using the specific image digest instead of a mutable tag ensures the exact image version is pulled, overriding the cache effectively.

How do I update a deployment manifest to use a container image digest?

You update a deployment manifest by replacing the mutable image tag with the specific image digest obtained after pushing. Modify your K8s or Terraform configurations to reference this digest, then restart the deployment to apply the exact image version.

Can I use image digests with containerd and local registry mirrors in Kubernetes?

Yes, using image digests with containerd ensures the exact image version is pulled even when local registry mirrors cache layers. This approach overrides the cache bypass limitations that occur when repeatedly pushing images with the same tag.