In order to work with a customized locally built image in a locally running Kubernetes cluster, the following approach did work out quite nice for an ad-hoc need.
Adjust the image name in Kubernetes
The first step is to adapt the Kubernetes objects, or to configure the HELM chart accordingly:
image: registry: "local" repository: "my-custom-api" imagePullPolicy: "IfNotPresent" tag: "latest"
This will render into the following image name:
local/my-custom-api:latest
Tag an image with the custom name
Now the full image name has to be used when building the image or tagging an image:
# Build the image and tag it docker build -t "local/my-custom-api:latest" . # Tag an existing image docker tag 002e2e768526 local/my-custom-api:latest