How to Use Skaffold for Go Development on Kubernetes

Use Skaffold to automate building and deploying Go applications to Kubernetes with a single command and live reload.

Skaffold automates building and deploying Go applications to Kubernetes by watching for code changes and pushing updates automatically. Create a skaffold.yaml configuration file in your project root and run skaffold dev to start the local development loop.

apiVersion: skaffold/v4
kind: Config
metadata:
  name: go-app
build:
  artifacts:
  - image: my-go-app
    context: .
    docker:
      dockerfile: Dockerfile
deploy:
  kubectl:
    manifests:
    - k8s/*.yaml
skaffold dev