Skip to content

Skaffold

Skaffold is a command-line tool designed to facilitate continuous development for Kubernetes-native applications.^[400-devops__01-Concepts-of-Software-Development__skaffold.md] It functions as an automation layer that handles the building, pushing, and deployment of containerized applications, streamlining the workflow for developers working with local or remote clusters.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__cicd__skaffold__README.md]

Core Features

Skaffold provides several key capabilities aimed at improving developer productivity and iteration speed:

  • Automated Building: It serves as an automated tool for building [[Docker]] images from source code.^[400-devops__01-Concepts-of-Software-Development__skaffold.md] It supports builders like pack to create images without requiring a Dockerfile.^[400-devops__01-Concepts-of-Software-Development__skaffold.md]
  • Automated Deployment: It manages the local deployment process for Kubernetes clusters.^[400-devops__01-Concepts-of-Software-Development__skaffold.md]
  • Fast Iteration: The tool enables fast development iteration cycles and can handle deployments to both local and remote clusters.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__cicd__skaffold__README.md]

Usage and Workflow

Skaffold operates primarily through two distinct modes that cater to different stages of the development lifecycle.

Development Mode

Running skaffold dev initiates the development loop.^[400-devops__01-Concepts-of-Software-Development__skaffold.md] In this mode, Skaffold enables hot-reloading capabilities, where manifests are pulled from the current branch.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__cicd__skaffold__README.md] This mode is often used in conjunction with tools like minikube for local development.^[400-devops__01-Concepts-of-Software-Development__skaffold.md]

Production/Run Mode

Running skaffold run executes a deployment intended for a production-like or continuous integration environment.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__cicd__skaffold__README.md] In this mode, manifests are typically pulled from remote charts rather than the local file system.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__cicd__skaffold__README.md]

Configuration

Skaffold's architecture is built around modules and profiles, allowing complex applications to be broken down into manageable components (e.g., distinct modules for Ingress, monitoring, or specific microservices).^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__cicd__skaffold__README.md]

Installation

Skaffold can be installed via various package managers. For Windows users, it is available through Chocolatey using the command choco install skaffold.^[400-devops__01-Concepts-of-Software-Development__skaffold.md] The source code and binaries are maintained in the GoogleContainerTools/skaffold GitHub repository.^[400-devops__01-Concepts-of-Software-Development__skaffold.md]

Sources

  • 400-devops__01-Concepts-of-Software-Development__skaffold.md
  • 400-devops__07-Monitoring-and-Observability__k8s-istio__samples__cicd__skaffold__README.md