当前位置:网站首页>[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 .

边栏推荐
- 远程访问及控制——SSH远程管理及TCP Wrappers 访问控制
- Flutter series - build a flutter development environment
- Service practice: use service to complete a download task
- Sre is bound to move towards the era of chaotic engineering -- Huawei cloud chaotic engineering practice
- Wavelet transform DB4 for four layer decomposition and signal reconstruction matlab analysis and C language implementation
- Teachers, I want to ask you a question. I run flinkcdc locally to synchronize MySQL data. The timestamp field parsing is normal,
- Digital enabling machinery manufacturing industry, supply chain collaborative management system solution helps enterprises upgrade their supply chain
- Flutter series -dart basic grammar learning
- Iplook, as a member of o-ran alliance, will jointly promote the development of 5g industry
- Active directory user logon Report
猜你喜欢

China's games are "harvesting" foreigners

Detailed explanation of session mechanism and related applications of session

新唐NUC980使用记录:开发环境准备与编译配置基础说明

session机制详解以及session的相关应用

AUTOCAD——五种标注快捷键

Active Directory用户登录报告

技术管理进阶——你了解成长的全貌吗?

what? Homekit, Micah, aqara and other ecosystems can also be linked with tmall elf ecology through zhiting?

Flutter系列-flutter路由管理

小波变换db4进行四层分解及其信号重构—matlab分析及C语言实现
随机推荐
程序员工具大全【持续更新】
结构型模式之装饰者模式
Creator mode summary
Thread pool: reading the source code of threadpoolexcutor
智能家居不知如何选?不妨看下这篇选购指南
Human Pose Estimation浅述
Digital commerce cloud: analyze the design idea of B2B2C multi-user mall system architecture, and open a new era of intelligent mall
shell脚本详解(七)——正则表达式、sort、uniq、tr
[suggestions collection] common usage scenarios of message queue
Programmer's tool encyclopedia [continuous update]
Cluster, distributed and microservice concepts and differences
Detailed explanation of shell script (x) -- how to use sed editor
Shell script explanation (IV) -- while loop and until loop of loop statements (additional examples and analysis)
Teachers, I want to ask you a question. I run flinkcdc locally to synchronize MySQL data. The timestamp field parsing is normal,
Flutter系列-Dart基础语法学习
Active directory user logon Report
结构型模式之代理模式
TypeScript(7)泛型
After reading the hated courage
数商云:数字化供应链系统搭建,赋能企业实现物流供应链的优化升级