Deployment

See Kubernetes Integration for information about deploying to Kubernetes.

Because the output of ko build is an image reference, you can easily pass it to other tools that expect to take an image reference.

docker run

To run the container locally:

  1. docker run -p 8080:8080 $(ko build ./cmd/app)

Google Cloud Run

  1. gcloud run deploy --image=$(ko build ./cmd/app)

💡 Note: The image must be pushed to Google Container Registry or Artifact Registry.


fly.io

  1. flyctl launch --image=$(ko build ./cmd/app)

💡 Note: The image must be publicly available.


AWS Lambda

  1. aws lambda update-function-code \
  2. --function-name=my-function-name \
  3. --image-uri=$(ko build ./cmd/app)

💡 Note: The image must be pushed to ECR, based on the AWS provided base image, and use the aws-lambda-go framework. See official docs for more information.


Azure Container Apps

  1. az containerapp update \
  2. --name my-container-app
  3. --resource-group my-resource-group
  4. --image $(ko build ./cmd/app)

💡 Note: The image must be pushed to ACR or other registry service. See official docs for more information.