user200778
user200778

Reputation: 164

Can't mount nfs persistent volume in kubernetes, because there is no nfs client install on each slave node

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?

Upvotes: 2

Views: 708

Answers (3)

Prashanth B
Prashanth B

Reputation: 5133

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

Upvotes: 1

Zach Loafman
Zach Loafman

Reputation: 63

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.

Upvotes: 1

Robert Bailey
Robert Bailey

Reputation: 18230

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

Upvotes: 0

Related Questions