Using NFS as storage, after deploying MySQL in K8S environment, NFS cannot display the contents of MySQL folders. Without manually modifying the NFS folder permissions, can the files under the corresponding files in the MySQL database be displayed?
NFS configuration
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/nfs/data 192.168.0.0/24(rw,no_root_squash,no_subtree_check,anonuid=1000,anongid=1000)
MySQL configuration
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql-server
namespace: infra
spec:
selector:
matchLabels:
app: mysql-server
template:
metadata:
labels:
app: mysql-server
spec:
containers:
- name: mysql-server
env:
- name: MYSQL_ROOT_PASSWORD
value: root
image: mysql:8.4.1
resources:
limits:
memory: "512Mi"
cpu: "500m"
ports:
- containerPort: 3306
volumeMounts:
- name: mysql-data
mountPath: /var/lib/mysql
- name: mysql-log
mountPath: /var/log/mysql
volumes:
- name: mysql-data
nfs:
server: 192.168.0.204
path: /nfs/data/mysql/standalone/data
- name: mysql-log
nfs:
server: 192.168.0.204
path: /nfs/data/mysql/standalone/log
NFS Server Folder Permission
Question
How should I configure it to display the contents of folders such as “#innodb_redo / #innodb_temp / performance_schema / sys” properly
“#innodb_redo / #innodb_temp / performance_schema / sys” show properly