Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update with the details with my actual steps details
Tip

You can skip this step if your Kubernetes cluster deployment is on a single VM or physical system.


When setting up a Kubernetes cluster, the folder /dockerdata-nfs must be shared between all of the Kubernetes nodes. This folder is used as a volume by the ONAP pods to share data, so there can only be one copy.

...

Code Block
languagebash
sudo mkdir -p /export/dockerdata-nfs

In our environment, we provision the dockerdata-nfs folder as an OpenStack volume and use that as the VM default backing store. This is optional and can be skipped.  See Create an OpenStack Volume for details.The following has been validated in OpenStack environment (more details in Create an OpenStack Volume):

  • create a OpenStack volume
  • attach the volume to the Kubernetes master node VM
  • mount the attached volume to directory /dockerdata-nfs on the Kubernetes master node VM


Setup the NFS server on the Kubernetes master node VM and export the dockerdata-nfs folder:

Code Block
languagebash
titlenfs server
sudo apt update
sudo apt  install nfs-kernel-server
sudo chmod 777 /export
sudo chmod 777 /export/dockerdata-nfs

sudo vi /etc/exports
# append "/export/dockerdata-nfs *(rw,no_root_squash,no_subtree_check)"

sudo vi /etc/fstab 
# append "/home/ubuntu/dockerdata-nfs /export/dockerdata-nfs    none    bind  0  0"

sudo service nfs-kernel-server restart

...

Mount the  dockerdata-nfs folder on each of the Kubernetes node VMs

...

titleWork in progress

More investigation is needed (as part of a multi-nodes Kubernetes cluser) as we're seeing a "Operation not permitted" error in the sdnc-dbhost pod when deploying an SDN-C cluster with the mounted /dockerdata-nfs from this instruction:

ubuntu@sdnc-k8s:~/oom/kubernetes/oneclick$ kubectl logs sdnc-dbhost-3029711096-w1szw -n onap-sdnc

[Entrypoint] MySQL Docker Image 5.6.38-1.1.2

chown: changing ownership of '/var/lib/mysql/': Operation not permitted

...

chown: /consul/config: Operation not permitted

ubuntu@sdnc-k8s:~/oom/kubernetes/oneclick$ 

On each of the Kubernetes node other Kubernetes cluster node VMs, mount the /dockerdata-nfs folder that is being served from the Kubernetes master VM.  

Code Block
languagebash
titlemount nfs mount
sudo apt install nfs-common 
sudo mkdir /dockerdata-nfs
sudo chmod 777 /dockerdata-nfs
sudo mount -t nfs -o proto=tcp,port=2049 <host|IP of k8s master node vm>:/export/dockerdata-nfs /dockerdata-nfs   nfs    auto  0  0:/export/dockerdata-nfs /dockerdata-nfs
sudo vi /etc/fstab
# append "<host|IP of k8s master node vm>:/export/dockerdata-nfs /dockerdata-nfs   nfs    auto  0  0"

...