google-cloud-platform - 如何将文件上传到 Google Cloud Filestore?
问题描述
我正在使用GKE,我想将 HTML 文件上传到Filestore,以便安装的 PersistentVolume 可以使用它。但是,Filestore 文档是模棱两可的。我已经尝试了该命令的一些变体,但我遇到了文档未涵盖的奇怪错误。这是我的 Filestore 实例:
INSTANCE_NAME ZONE TIER CAPACITY_GB FILE_SHARE_NAME IP_ADDRESS STATE CREATE_TIME
filestore us-central1-a BASIC_HDD 1024 filestore <ADDRESS> READY 2021-08-15T13:30:39
图表中的交易量声明:
volumeMounts:
- mountPath: /filestore
name: mypvc
我不明白我应该在 scp 命令中使用什么client-name:/mount-directory
。
使用 3 个 gke 实例结果之一scp: /filestore: Read-only file system
gcloud compute scp /path/to/local/file/index.tmpl gke-my-first-cluster-1-default-pool-b6dd53a7-jtqb:/filestore --project= project
使用filestore-ip:/filestore-path
结果The resource was not found
我也尝试过的命令:
gke-my-first-cluster-1-default-pool-b6dd53a7-jtqb:/mnt/fileshare/
scp: /mnt/fileshare/: Is a directory
--
gke-my-first-cluster-1-default-pool-b6dd53a7-jtqb:/mnt/fileshare/index.tmpl
scp: /mnt/fileshare/index.tmpl: No such file or directory
--
gke-my-first-cluster-1-default-pool-b6dd53a7-jtqb:/mnt/fileshare
scp: /mnt/fileshare: Read-only file system
所以主要问题我应该在这里使用什么?
谢谢
解决方案
将文件存储挂载为映射驱动器并上传到站点并存储在已挂载的驱动器上。
推荐阅读
- algorithm - Dijkstra 算法的运行时复杂度
- python - 访问具有正确 dtype 的行段
- javascript - 这个用于实现浮动标签输入onfocus的角度ts代码有什么问题?
- mysql - 在 where 子句的 in() 中使用查询语句时获取多行中的一行
- xml - 设置计数器值
- javascript - javascript乘法产生不同的结果
- c# - WPF DataGrid 和 IAsyncEnumerable 项
- php - php中的错误顺序回显
- reactjs - 重新渲染一个组件,它是反应中表格行的一部分
- android - 我无法在 android 中使用 kotlin 在 sqlite 中创建第二个表