Google Kubernetes VM instances with Windows Server

12/12/2018

I have a Google Kubernetes cluster with its associated VM instance. How can I change the image of the disk used by that VM instance to Windows Server Edition? I know it's possible to create a VM instance from a Windows Server Image, but how do I change the current image of my existing VM instance to a Windows Server Image?

Thank you

-- Harry Stuart
google-cloud-platform
google-kubernetes-engine
kubernetes
virtual-machine
windows-server

1 Answer

12/12/2018

As of writing this answer(December 2018), Google Kubernetes engine supports two operating systems:

  • Container-Optimized OS (from Google)
  • Ubuntu

More details about supported image types you can find here

To change VM image, you need to update your configuration, this depends on how you create your kubernetes cluster. For example you have option to select the image when creating your cluster via web ui(create cluster -> node pools -> customize -> advanced edit):

enter image description here

If you are creating the cluster via configuration file you need to update the image you want to use in the config file and apply your changes, for example:

apiVersion: v1
kind: Pod
metadata:
  name: resource-reserver
spec:
  containers:
  - name: sleep-forever
    image: <your-image-here>
-- Caner
Source: StackOverflow