Ko

Ko (https://github.com/google/ko) is a very interesting Go-specific tool. Its goal is to streamline and hide the process of building images. The idea is that, in your Kubernetes deployment, you replace the image path from the registry with a Go import path. Ko will read this import path, build a Docker image for you, publish it to a registry (or locally if using Minikube), and deploy it to your cluster. Ko provides ways to specify a base image and include static data in the generated image. Let's give it a try and discuss the experience later.

You can install Ko through the standard go get command:

go get github.com/google/ko/cmd/ko

Ko requires that you work in GOPATH. I don't typically work inside GOPATH for various reasons (Delinkcious ...

Get Hands-On Microservices with Kubernetes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.