Files
tldr/pages/common/ko.md
T
ALVIN GEORGE 4c42126846 ko: add page (#22150)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
Co-authored-by: Axel Navarro <navarroaxel@gmail.com>
Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com>
2026-05-26 00:34:18 -05:00

1.0 KiB

ko

Build and deploy Go applications as container images on Kubernetes. More information: https://ko.build/reference/ko/.

  • Build and publish a container image from a Go package import path:

ko build {{import_path}}

  • Build and load a container image into a local Docker daemon:

ko build {{[-L|--local]}} {{import_path}}

  • Apply Kubernetes manifests with Go image references resolved to digests:

ko apply {{[-f|--filename]}} {{path/to/manifest.yaml}}

  • Create Kubernetes resources with resolved image references:

ko create {{[-f|--filename]}} {{path/to/manifest.yaml}}

  • Print resolved Kubernetes manifests without applying them:

ko resolve {{[-f|--filename]}} {{path/to/manifest.yaml}}

  • Build and run a Go package on Kubernetes:

ko run {{import_path}}

  • Delete Kubernetes resources defined in a manifest:

ko delete {{[-f|--filename]}} {{path/to/manifest.yaml}}

  • Log in to a container registry:

ko login {{registry.example.com}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}}