This page discusses how to develop locally with Skaffold.
Local development means that Skaffold can skip pushing built container images, because the images are already present where they are run.
For standard development setups such as
docker-for-desktop, this works out of the box.
- Ensure that Skaffold builds the images with the docker daemon, which also runs the containers.
Tell Skaffold to skip pushing images either by configuring
build: local: push: false
or by marking a kubernetes context as local (see the following example).
For example, when running
minikube with a custom profile, such as
minikube start -p my-profile:
Set up the docker environment for Skaffold with
source <(minikube docker-env -p my-profile). This should set some environment variables for docker (check with
env | grep DOCKER). It is important to do this in the same shell where Skaffold is executed.
Tell Skaffold that the kubernetes context
my-profilerefers to a local cluster with
skaffold config set --kube-context my-profile local-cluster true