Skip to content

kube-fledged

The kube-fledged component allows you to prefetch and cache container images on all or selected worker nodes. This ensures a container image is readily available when a deployment/pod is moved between worker nodes. This ensures better startup times and ensures image availability in-cluster in the event that the external image registry is inaccessible.

To prefetch a set of images, you may add an ImageCache object to your chart with a list of images to fetch. By embedding this extra object in the chart, it can be templated with the relevant image name and version, just like the rest of the helm chart.

By specifying the pull secret for the current deployment, you can access the images in private registries from your cache, just like you would from your Deployments.

kube-fledged-example.yaml
---
apiVersion: kubefledged.io/v1alpha2
kind: ImageCache
metadata:
# Name of the image cache. A cluster can have multiple image cache objects
name: imagecache
# The kubernetes namespace to be used for this image cache. You can choose a different namepace as per your preference
labels:
app: kubefledged
kubefledged: imagecache
spec:
# The "cacheSpec" field allows a user to define a list of images and onto which worker nodes those images should be cached (i.e. pre-pulled).
cacheSpec:
# Specifies a list of images (nginx:1.23.1) with no node selector, hence these images will be cached in all the nodes in the cluster
- images:
- publicimage:1.23.1
- anotherimage:1.2.3
# Specifies a list of image pull secrets to pull images from private repositories into the cache
#imagePullSecrets:
#- name: myregistrykey

More generic information about using this tool is available at the upstream usage documentation.