How to deploy a Windows container on Google Kubernetes Engine

The Good, the Bad and the Ugly in Cybersecurity – Week 39
September 27, 2019
TOKAI Group Adopts Red Hat OpenShift Dedicated for Fully-Managed Enterprise Kubernetes
September 30, 2019
The Good, the Bad and the Ugly in Cybersecurity – Week 39
September 27, 2019
TOKAI Group Adopts Red Hat OpenShift Dedicated for Fully-Managed Enterprise Kubernetes
September 30, 2019

Many people who run Windows containers want to use a container management platform like Kubernetes for resiliency and scalability. In a previous post, we showed you how to run an IIS site inside a Windows container deployed to Windows Server 2019 running on Compute Engine. That’s a good start, but you can now also run Windows containers on Google Kubernetes Engine (GKE).

Support for Windows containers in Kubernetes was announced earlier in the year with version 1.14, followed by GKE announcement on the same. You can sign up for early access and start testing out Windows containers on GKE.

In this blog post, let’s look at how to deploy that same Windows container to GKE.

In the previous post, we created a container image locally. The first step is to push that image to Container Registry, so that you can later use it in your Kubernetes deployment.

To push images from a Windows VM to Container Registry, you need to:

  1. Ensure that the Container Registry API is enabled in your project.
  2. Configure Docker to point to Container Registry. This is explained in more detail here but it is usually done via the gcloud auth configure-docker command.
  3. Make sure that the VM has storage read/write access scope (storage-rw), as explained here.

Once you have the right setup, it’s just a regular Docker push:

Leave a Reply

Your email address will not be published. Required fields are marked *