绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
MACOS下minikube使用NFSd
2023-04-20 18:24:28

一、NFSd配置

  1. 打开系统配置 System Preferences
  2. 点开安全和隐私 Security & Privacy → Privacy → Full Disk Access
  3. 点击 输入密码
  4. 点击 +
  5. 按下⌘ command + shift + G
  6. 键入/sbin/nfsd 并点击 Go, 然后点击Open
允许完全访问磁盘

注:这个选项会允许nfsd访问所有磁盘文件。

二、Minikube的安装

# minikube start --driver=hyperkit --container-runtime=containerd \
--image-mirror-country=cn --nfs-share=/Users/tom/Documents/letsencrypt \
--nfs-shares-root=/nfsshares
  minikube v1.19.0 on Darwin 11.3
 ▪ KUBECONFIG=/Users/tom/.kube/config
✨ Using the hyperkit driver based on user configuration
❗ None of the known repositories in your location are accessible. Using registry.cn-hangzhou.aliyuncs.com/google_containers as fallback.
✅ Using image repository registry.cn-hangzhou.aliyuncs.com/google_containers
  Starting control plane node minikube in cluster minikube
  Creating hyperkit VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
  Preparing Kubernetes v1.20.2 on containerd 1.4.3 ...
 ▪ Generating certificates and keys ...
 ▪ Booting up control plane ...
 ▪ Configuring RBAC rules ...
  Configuring bridge CNI (Container Networking Interface) ...
  Verifying Kubernetes components...
 ▪ Using image registry.cn-hangzhou.aliyuncs.com/google_containers/k8s-minikube/storage-provisioner:v5 (global image repository)
  Enabled addons: storage-provisioner, default-storageclass
  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
  1. 查看exports文件
> $ cat /etc/exports
# BEGIN: minikube-hyperkit minikube-/Users/tom/Documents/letsencrypt
/Users/tom/Documents/letsencrypt 192.168.64.15 -alldirs -mapall=tom
# END: minikube-hyperkit minikube-/Users/tom/Documents/letsencrypt

2. 在一些特别的场景下需要local_lock=all

需要重新remount一下,并带上local_lock=all 选项。

# minikube ssh 'su -c "mount -t nfs -o remount,rw -o local_lock=all 192.168.64.1:/Users/tom/Documents/letsencrypt /nfsshares/Users/tom/Documents/letsencrypt "'

分享好友

分享这个小栈给你的朋友们,一起进步吧。

容器化的边边角角
创建时间:2020-02-14 17:28:00
从前在通往容器化的道路上低头踩坑无数,现如今抬头看路,总结过去,希望能走快些。
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

栈主、嘉宾

查看更多
  • frogwisperer
    栈主

小栈成员

查看更多
  • abc
  • 我没
  • 飘絮絮絮丶
  • Jack2k
戳我,来吐槽~