LoginSignup
4
2

More than 5 years have passed since last update.

IBM Cloud File StorageをPodにNFSv3でマウントする

Posted at

経緯

IBM Cloud Kubernetes ServiceではStorageClassを指定したPVCを作成することでIBM Cloud File Storageを動的にオーダーできます。とても便利なのですが、そこで手に入れたPVをPodにマウントすると、NFSv4としてマウントされます。

一方、IBM Cloud File StorageではNFSはv3を使用することが強く推奨されているようです。そのため、PVの定義でマウントオプションを変更する必要があります。

手順

全部一斉に変える1 Liner

$ kubectl get pv -o name | cut -d "/" -f 2 | xargs -I {} kubectl patch pv {} -p '{"spec":{"mountOptions":["nfsvers=3"]}}'

なお、PVはnamespaceがないので上記コマンドで全てのPVがパッチされますのでご注意ください。

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2