Getting started with Skaffold

Krish | 17 August 2018

Skaffold Skaffold is an open source command line ‘Continuous Development’ tool, which has been released earlier this year by Google. It helps developers to develop Kubernetes native applications, which do not require a server-side component on your Kubernetes cluster and have pluggable architecture. This allows you to choose the tools in the developer workflow that best suit your needs. It has gained popularity in a short period of time among the community, and has been well adopted by other CI/CD tools - such as JenkinsX, which uses Skaffold to do Docker image building.

As of now Skaffold works along with following build and release tools

The community is also working on Java build tools such as Gradle and Maven, and support for Knative as a build plugin.

Continuous Development with Skaffold (local)


  • Docker

  • Local Kubernetes installation (Minikube/ Docker for Windows/Mac)

Download and install latest Skaffold binary from

curl -Lo skaffold
chmod +x skaffold
sudo mv skaffold /usr/local/bin


Getting started

To start you would place a Skaffold config file in the root directory along with your source code, Docker file and Kubernetes manifests. Then you run skaffold dev, which will trigger the Docker build and tag locally, and kubectl apply to your local Kubernetes cluster to deploy your application. Skaffold will be watching your source directory for changes and continuously building and deploying when changes are detected, based on your config.

Or you can simply run skaffold run to skip the continuous deployment and just build and deploy your application on your Kubernetes cluster.

Skaffold Diagram image

Once you have installed Skaffold, place the following files in a directory (change Docker image details in k8s-manifest.yaml and skaffold.yaml) and run skaffold dev.

package main

import (

func main() {
    for {
        fmt.Println(""Hello world!"")
        time.Sleep(time.Second * 1)



# Dockerfile
FROM golang:1.10.1-alpine3.7 as builder
COPY main.go .
RUN go build -o /app main.go

FROM alpine:3.7  
CMD ["./app"]
COPY --from=builder /app .


# k8s-manifest.yaml
apiVersion: v1
kind: Pod
  name: getting-started
  - name: getting-started
    image: /lw-skaffold-demo


apiVersion: skaffold/v1alpha2
kind: Config
  - imageName: /lw-skaffold-demo
      - k8s-*


Then make some changes in main.go and save. The new version (with changes) of your application will be built and deployed automatically by Skaffold on Kubernetes cluster, as well as streaming hot deployment logs.


With Skaffold, developers can perform hot deployment and mirror the the production deployment easily in their local or remote Kubernetes clusters. By having a local automated development + deployment workflow with Skaffold and Kubernetes, you can save time when developing and produce quality code. It will doubtless be a great help for developers who love Kubernetes, and I can see it being invaluable in the Kube community.

Need help running Kubernetes?

Get in touch and see how we can help you.

Contact Us

+44 (0) 20 3608 0110