Tip |
---|
You can skip this step if your Kubernetes cluster deployment is on a single VM. |
...
Use local directory | Run the following command as root:
| |||||
---|---|---|---|---|---|---|
Use separate volume | Following instruction fromĀ Create an OpenStack Volume to: (where the VM Instance is the one that you have chosen) |
...
Execute the following commands :as ubuntu user.
Code Block | ||||
---|---|---|---|---|
| ||||
sudo apt update sudo apt install nfs-kernel-server sudo vi /etc/exports # append the following /dockerdata-nfs *(rw,no_root_squash,no_subtree_check) sudo vi /etc/fstab # append the following /home/ubuntu/dockerdata-nfs /dockerdata-nfs none bind 0 0 sudo service nfs-kernel-server restart |
Expand | ||
---|---|---|
| ||
$ ps -ef|grep nfs |
On the other VMs (Kubernetes Worker Nodes)
...
On each of the Kubernetes worker nodes, mount the /dockerdata-nfs folder. Run the followings as ubuntu user.
Code Block | ||||
---|---|---|---|---|
| ||||
sudo apt update sudo apt install nfs-common -y sudo mkdir /dockerdata-nfs sudo chmod 777 /dockerdata-nfs # Option 1: sudo mount -t nfs -o proto=tcp,port=2049 <hostname or IP address of NFS server>:/dockerdata-nfs /dockerdata-nfs sudo vi /etc/fstab # append the following <hostname or IP address of NFS server>:/dockerdata-nfs /dockerdata-nfs nfs auto 0 0 # Option 2: sudo vi /etc/fstab # append the following line. <hostname or IP address of NFS server>:/dockerdata-nfs /dockerdata-nfs nfs auto 0 0 # run the following line sudo mount -a |
...