skaffold run: Usage, Options & Common CI Errors
Build, tag, push, and deploy your app to Kubernetes in one shot.
skaffold run executes the full pipeline from skaffold.yaml once - build, tag, push, deploy - and exits. It is the one-shot, CI-friendly counterpart to the watch-based skaffold dev.
What it does
skaffold run reads skaffold.yaml, builds each artifact, tags it (per the tagging policy), pushes images to a registry, and deploys to the active Kubernetes context using the configured deployer (kubectl, kustomize, Helm). Unlike skaffold dev it runs to completion and does not watch for changes.
Common usage
# Build and deploy once using the current kube-context
skaffold run
# CI: select a profile and override the image registry
skaffold run --profile prod --default-repo registry.example.com/team
# Tag images by git commit and wait for the deploy to be ready
skaffold run --tag "${GIT_SHA}"Common error in CI: no kube-context / cannot push image
run fails with "no current context is set" / "Unable to connect to the server" (no kubeconfig on the runner) or "denied: requested access to the resource is denied" (registry auth/repo wrong). Fix: provide a kubeconfig and set the context in CI, and set --default-repo (or skaffold config) to a registry the runner can push to after docker login/registry auth. Use a deterministic --tag (commit SHA) so the built image and the deployed manifest reference the same thing.
Key options
| Option | Purpose |
|---|---|
| --profile NAME | Activate a skaffold profile |
| --default-repo REPO | Override the image registry prefix |
| --tag TAG | Use a fixed image tag |
| --namespace NS | Deploy to a namespace |
| --kube-context CTX | Target a kube-context |