ko
ko.build
What it is
ko is an open-source builder for container images of Go applications. It runs `go build` locally, so Docker does not need to be installed. The project positions it for a single Go application with few operating-system base-image dependencies, such as one without cgo or OS package requirements. Builds can target all platforms supported by the configured base image or selected platforms such as linux/amd64 and linux/arm64. For Kubernetes, `ko resolve` builds images for `ko://` references in YAML and replaces those references with image references; `ko apply` can apply the resolved configuration. ko reuses the normal Go build cache and avoids pushing image blobs already present in the remote registry. It generates and uploads SPDX-format SBOMs by default, with an option to disable this. Registry credentials can come from Docker configuration, with built-in environment credential support for Google, Amazon, Azure, and GitHub container registries. A Terraform provider supports Infrastructure-as-Code workflows. ko supports Go applications only and defaults to CGO_ENABLED=0. Windows container image support is experimental and requires a Windows base image.
Spec sheet
- Purpose
- ko is a simple, fast container image builder for Go applications.Read 5 Oct 2026 · ko.build
- Integrations
- ko provides a Terraform provider for using image builds in Infrastructure-as-Code workflows.Read 5 Oct 2026 · ko.build
- Best fit
- ko is ideal for a single Go application with few or no dependencies on the operating system base image, such as applications without cgo or OS package dependencies.Read 5 Oct 2026 · ko.build
- Build cache
- ko reuses the normal go build cache and avoids pushing image blobs already present in the remote registry.Read 5 Oct 2026 · ko.build
- Build method
- ko runs go build on the local machine and does not require Docker to be installed.Read 5 Oct 2026 · ko.build
- Community support
- The project offers a bi-weekly community meeting and discussion in the #ko-build channel on Kubernetes Slack.Read 5 Oct 2026 · ko.build
- Debugging
- The --debug build flag adds Delve and debug symbols to the image and runs the app in debug mode on port 40000; the feature is intended for development, not production.Read 5 Oct 2026 · ko.build
- How it builds
- ko runs go build on the local machine and does not require Docker to be installed.Read 5 Oct 2026 · ko.build
- Ideal use
- ko is ideal for Go applications without many dependencies on the operating system base image, such as applications that do not use cgo or require OS packages.Read 5 Oct 2026 · ko.build
- Install platforms
- The installation guide documents Windows, macOS, and Linux installation options, including GitHub releases, package managers, and source installation.Read 5 Oct 2026 · ko.build
- Kubernetes
- ko resolve replaces ko:// Go import paths in Kubernetes YAML with built image references, and ko apply can apply the resolved configuration.Read 5 Oct 2026 · ko.build
- Kubernetes workflow
- ko resolve builds images for ko:// references in Kubernetes YAML and replaces them with the resulting image references.Read 5 Oct 2026 · ko.build
- Limit
- ko only supports Go applications and works best when applications do not depend on the underlying image; builds use CGO_ENABLED=0 by default.Read 5 Oct 2026 · ko.build
- Limitations
- ko supports Go applications only, defaults to CGO_ENABLED=0, and requires OS packages to be available in the configured base image.Read 5 Oct 2026 · ko.build
- Multi-platform builds
- ko can build for all platforms supported by the configured base image or for selected platforms such as linux/amd64 and linux/arm64.Read 5 Oct 2026 · ko.build
- Project and community
- ko is a Cloud Native Computing Foundation Sandbox project, and its community page lists bi-weekly meetings and a Kubernetes Slack channel.Read 5 Oct 2026 · ko.build
- Project status
- ko is a Cloud Native Computing Foundation Sandbox project.Read 5 Oct 2026 · ko.build
- Registry authentication
- ko supports registry credentials from Docker configuration and has built-in environment credential support for Google, Amazon, Azure, and GitHub container registries.Read 5 Oct 2026 · ko.build
- Release verification
- The installation guide describes verifying releases with GitHub Artifact attestations and says releases through v0.19.1 used SLSA provenance.Read 5 Oct 2026 · ko.build
- SBOMs
- Since v0.9, ko generates and uploads an SPDX-format SBOM for every image by default; SBOM generation can be disabled with --sbom=none.Read 5 Oct 2026 · ko.build
- Static assets
- ko bundles contents of an application's kodata directory into its image and exposes the image path through KO_DATA_PATH.Read 5 Oct 2026 · ko.build
- Tool integrations
- The FAQ lists integrations or support in Skaffold, goreleaser, Tekton, Carvel kbld, and Tilt.Read 5 Oct 2026 · ko.build
- Windows image support
- Windows container image support is described as new, experimental, and tenuous, and requires configuring a Windows base image.Read 5 Oct 2026 · ko.build
Plans and prices
Strong points and limits
Strong points
- Builds Go images without requiring Docker.
- Reuses the normal Go build cache.
- Generates SPDX-format SBOMs by default.
- Supports selected multi-platform builds.
Limits
- Supports Go applications only.
- Defaults to CGO_ENABLED=0.
- Windows container image support is experimental.
Who it suits
ko suits developers building container images for Go applications, especially single applications with few dependencies on the base image. It also fits Kubernetes workflows that use Go import paths in YAML.
Verdict
ko offers a direct route from a local Go build to a container image, with Kubernetes YAML support and default SBOM generation. It is a narrower fit for Go programs with limited operating-system dependencies; Windows image support remains experimental.
Where Specifiction places it
- Container Build Tools#8 of 348.3