How can I add metadata to all instances in a GKE node-pool?

9/28/2018

I want to create a preemptible node-pool in GKE where each instance runs a shutdown script when it is shutdown. In order to do this I need to add metadata to each of the instances.

How can I configure that?

-- dippynark
google-cloud-platform
google-kubernetes-engine
kubernetes

1 Answer

10/2/2018

When creating your node pool, you may click on “advanced edit”, and add the shutdown script in Metadata. The section to edit Metadata is found just above the Save and Cancel buttons.

-- dany L
Source: StackOverflow