当前位置:网站首页>[nfs failed to mount problem] mount nfs: access denied by server while mounting localhost:/data/dev/mysql
[nfs failed to mount problem] mount nfs: access denied by server while mounting localhost:/data/dev/mysql
2022-06-22 19:38:00 【Dream_ it_ possible!】
centos 7 Use nfs An error occurred while mounting the data volume :localhost kubelet: mount.nfs: access denied by server while mounting localhost:/data/dev/mysql
perform Create when ,mysql The container has been in creating state ,mysql-dev-nfs.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: mysql-dev
labels:
name: mysql-dev
spec:
replicas: 1
selector:
name: mysql-dev
template:
metadata:
labels:
name: mysql-dev
spec:
containers:
- name: mysql
image: nacos/nacos-mysql:5.7
ports:
- containerPort: 3307
volumeMounts:
- name: mysql-data
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "root"
- name: MYSQL_DATABASE
value: "nacos_devtest"
- name: MYSQL_USER
value: "nacos"
- name: MYSQL_PASSWORD
value: "nacos"
volumes:
- name: mysql-data
nfs:
server: localhost
path: /data/dev/mysql
---
apiVersion: v1
kind: Service
metadata:
name: mysql-dev
labels:
name: mysql-dev
spec:
ports:
- port: 3307
targetPort: 3307
nodePort: 30070
selector:
name: mysql-dev
type: NodePort I want to put mysql-data Mount to this machine /data/dev/mysql Under the table of contents , Use command cat /var/log/messages | grep mount see mount Related logs , It keeps reporting errors access denied, The following is the log after solving the problem .
resolvent :
1. Check whether the system is equipped with nfs service, You can use systemctl status <service_name> see .

2. Set the mounted directory to insecure attribute , Carry out orders
vim /etc/exportsAdd the following , Said to /data Give permissions and permissions to the directory insecure.
/data *(insecure,rw,async,no_root_squash)
After editing , preservation , restart nfs service.

systemctl restart nfs

3. Re execution kubectl apply -f service command , see pods Is it working .

边栏推荐
- Iplook becomes RedHat (red hat) business partner
- China's games are "harvesting" foreigners
- 输入两个字符串,输出最长相同子串
- Notes on Combinatorics (V) chains in distributive lattice
- 知识蒸馏之Focal and Global Knowledge Distillation for Detectors
- Service实战:使用Service完成一个下载任务
- After reading the hated courage
- 维智科技亮相西部数博会,时空AI技术获高度认可
- Thread pool: reading the source code of threadpoolexcutor
- In the first half of the year, there were 7 new unicorns in this field, and the capital scrambled to enter the market
猜你喜欢

Agent model of structured model

Xintang nuc980 usage record: basic description of development environment preparation and compilation configuration

China's games are "harvesting" foreigners

Message Oriented Middleware (I) MQ explanation and comparison of four MQS

Shell script explanation (VII) -- regular expression, sort, uniq, tr

2年狂赚178亿元,中国游戏正在“收割”老外
![[nfs无法挂载问题] mount.nfs: access denied by server while mounting localhost:/data/dev/mysql](/img/15/cbb95ec823cdde5fb8f032dc45cfc7.png)
[nfs无法挂载问题] mount.nfs: access denied by server while mounting localhost:/data/dev/mysql

Play typical usage scenarios of kubernetes | dashboard for 5 minutes every day

Cluster, distributed and microservice concepts and differences

Iplook and SBC establish long-term cooperation
随机推荐
知识蒸馏之Focal and Global Knowledge Distillation for Detectors
程序员工具大全【持续更新】
Thread pool: reading the source code of threadpoolexcutor
Screw database document generator
最长公共子序列
Play typical usage scenarios of kubernetes | dashboard for 5 minutes every day
Methods for converting one-dimensional data (sequence) into two-dimensional data (image) GAFS, MTF, recurrence plot, STFT
[suggestions collection] common usage scenarios of message queue
数组对象实现一 一对比(索引和id相同的保留原数据,原数组没有的数据从默认列表加进去)
DIV横向布局
回文数(简单版)
PAT甲级1093 Count PAT‘s (25分)
SSH password free login
常用技术注解
Do you use thread or service?
贪心之区间问题(3)
STM32 control matrix key, Hal library, cubemx configuration
5g short message solution
Active directory user logon Report
维智科技亮相西部数博会,时空AI技术获高度认可