#!/bin/bash echo "Setting up NFS server..." apt-get update apt-get install -y nfs-kernel-server mkdir -p /nfscontrol chown nobody:nogroup /nfscontrol chmod 755 /nfscontrol echo "
This content is served from an NFS share mounted in multiple Nginx pods.
" >> /nfscontrol/index.html echo "Last updated: $(date)
" >> /nfscontrol/index.html chown nobody:nogroup /nfscontrol/index.html chmod 644 /nfscontrol/index.html cat > /etc/exports << EOF /nfscontrol *(rw,sync,no_subtree_check,no_root_squash,insecure) EOF exportfs -ra systemctl restart nfs-kernel-server systemctl enable nfs-kernel-server echo "NFS Server setup completed. Directory /nfscontrol is now exported." echo "Your NFS server IP addresses:" ip addr show | grep "inet " | grep -v "127.0.0.1" echo "Use the appropriate IP address in your nfs-pv.yaml file"