In Google Dataproc there is the option to specify a script to run when initialising the cluster. Is there any equivalent for GKE? I want to use it to install xfsprogs on the nodes so I can mount xfs volumes in containers.
There isn't an api field that you can set that will cause a script to be executed on each node when the node is created. Instead, we recommend that you use a DaemonSet
object to customize each node. See https://github.com/kubernetes/contrib/pull/892 for an example of how this can be done.