Skip to content

Example of how to deploy a Konlet VM using Pulumi to GCP: run Docker directly on GCP

License

Notifications You must be signed in to change notification settings

hermanbanken/konlet-pulumi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Konlet: cheapest way to continuously run Docker image on GCP

This Pulumi setup deploys a Docker image to GCP. It does so in the cheapest way possible: using e2-micro instances and preemptible instances (60-91% discount). This means you can have a running instance 24/7 for around 3$/month.

The setup uses the Konlet feature of the host VM OS (cos-cloud).

Alternatives

In principle, this is much like running the following commands. However, those commands can not easily be automated. This repository provides a template for how to automate them using Pulumi.

export DOCKER_IMAGE=gcr.io/cloud-marketplace/google/nginx1:15

# Single instance
gcloud compute instances create-with-container VM_NAME \
    --container-image $DOCKER_IMAGE

# or with a MIG (https://cloud.google.com/compute/docs/containers/deploying-containers#managedinstancegroupcontainer) template
gcloud compute instance-templates create-with-container nginx-template \
    --container-image $DOCKER_IMAGE
gcloud compute instance-groups managed create example-group \
    --base-instance-name nginx-vm --size 1 --template nginx-template

About

Example of how to deploy a Konlet VM using Pulumi to GCP: run Docker directly on GCP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages