liveBook · Manning

imagePullSecrets field

As explained in Kubernetes in Action, Second Edition

The imagePullSecrets field in a pod specification lists Secrets containing credentials for authenticating to container registries.

The imagePullSecrets field lists Secret names that Kubernetes uses to authenticate when pulling container images from private registries. Without suitable credentials, Kubernetes cannot start pods using those images. section 8.3.2

Attach a pull Secret to a pod

Create a registry Secret with kubectl, then reference it by name in the pod specification. The Secret named pull-secret enables this pod to pull docker.io/me/my-private-image. section 8.3.2

Listing 8.14 Adding a pull secret to a pod
apiVersion: v1
kind: Pod
metadata:
  name: private-image
spec:
  imagePullSecrets:      #1
  - name: pull-secret    #1
  containers:                                #2
  - name: private                            #2
    image: docker.io/me/my-private-image     #2

Use the manifest example to see imagePullSecrets placed alongside containers in a pod specification. section 8.3.2

How Kubernetes in Action, Second Edition covers it

How deep it goes
Defines the field’s purpose, Secret-name reference, and pod-manifest placement, but does not detail credential storage internals.
Examples
Shows a docker-registry Secret named pull-secret referenced by a pod running a private image.
What it assumes
Assumes familiarity with pods and container images while introducing registry credentials and pull Secrets.
What you can do after
Operate Kubernetes manifests by creating a pull Secret and attaching its name to imagePullSecrets.
How it connects
Connects pod specifications with Secrets, private container registries, container images, and kubectl.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.