liveBook · Manning

Skaffold configuration file

As explained in Google Anthos in Action

A Skaffold configuration file is a YAML document that defines Skaffold build, deployment, and development workflow steps.

A Skaffold configuration file is a single YAML document, usually named skaffold.yaml, that defines build and deployment steps for a continuous delivery workflow. It resembles a Kubernetes resource manifest and coordinates container image creation with Kubernetes deployment. section 12.3.2

apiVersion: skaffold/v2beta8
kind: Config
build:
 artifacts:
 - image: skaffold-example
deploy:
 kubectl:
   manifests:
     - k8s-*

A minimal configuration builds the skaffold-example image from a Dockerfile, then uses kubectl to deploy manifests matching k8s-*. section 12.3.2

A practical workflow includes:

  • Run skaffold init to detect local source files and generate a basic configuration with build and deploy sections. section 12.3.2
  • Define an image artifact and connect deployment to Kubernetes manifests, such as k8s-pod.yaml. section 12.3.2
  • Use skaffold dev for the development workflow, selecting a cluster context such as minikube when needed. section 12.3.2

How Google Anthos in Action covers it

How deep it goes
Explains YAML structure through build and deploy phases, but defers comprehensive schema details to external documentation.
Examples
Uses a Go Hello World application, Dockerfile, Kubernetes pod manifest, and skaffold-example image.
What it assumes
Assumes Dockerfile and Kubernetes manifest knowledge while providing a basic Go application and configuration workflow.
What you can do after
Operate/configure Skaffold by generating a YAML file, building an image, and deploying selected Kubernetes manifests.
How it connects
Connects Dockerfiles, container images, Kubernetes manifests, kubectl, minikube, and continuous delivery pipelines.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.