Hi,
I stumbled upon this topic when desparately searching for ways to run a custom VM image (or customize one of the two existing images you can choose fromwhen creating your cluster) with GKE.
In the GKE cluster creation wizard, I can only choose two images (cos and ubuntu).
Motivation is that I need to set a certain host-level parameter to make Elasticsearch work on the cluster. Basically it is just one command
sysctl -w vm.max_map_count=262144
Without this setting, my Elasticsearch pods will crash on startup.
I got it to run by using a NON-autoscaling cluster, logging in to each worker node, and change the setting manually (by also adding it to /etc/sysctl.d/00-sysctl.conf file).
Alas, this gets annoying really fast and will obviously not work for autoscaling clusters.
Next I tried to create a regular (non-GKE) instance from the cos image manually, then change the setting, and then use this instance's disk to create a custome image.
That worked, but the resulting image would not show up in the "create cluster" wizard.
Alas, I also noticed that an overlayfs is used for /etc in the cos image, so my change wouldn't be persisted anyway - which also means that the manual change I made on my GKE nodes would also not survive a reboot.
So is there a way to create and select one's own VM image for GKE?
Regards
JuGo