2

After I manually install nfs client package under each node, then it works. But in GKE, slave node can be scale in and out. After create a new slave node, I lose nfs client package again.

Is there any way we can install software package when kubernetes spin up a new slave node?

rjdkolb
  • 8,217
  • 8
  • 57
  • 77
user200778
  • 144
  • 1
  • 4

3 Answers3

1

Starting last week, new GKE clusters should be on created on 1.1.1 by default, and the nfs-common package is installed on all 1.1.1 clusters. (For existing clusters, you'll need to wait until the hosted master is upgraded, then initiate a node upgrade.)

See https://github.com/kubernetes/kubernetes/blob/release-1.1/examples/nfs/README.md for a larger example.

1

Please also see https://github.com/kubernetes/kubernetes/issues/16741 where we're discussing nfs and pretty much exactly this problem (amongst others)

Prashanth B
  • 3,981
  • 17
  • 13
0

There isn't currently a way to automatically run a command when a new GKE node is provisioned.

Robert Bailey
  • 16,541
  • 2
  • 46
  • 52