gpt4 book ai didi

kubernetes - 对 Google Cloud 中的 Persistent Volume 的 Shell 访问

转载 作者:行者123 更新时间:2023-12-04 14:23:52 24 4
gpt4 key购买 nike

我想获得对我在 Google Cloud Platform 上创建的 Persistent Volume 的 shell 访问权限。

我尝试为此使用 Google Cloud Shell。但是为了能够做到这一点,我需要通过 gcloud 命令附加 Persistent Volume,并且该命令需要实例名称。但是当我列出实例名称(在 gcloud 中)时,我没有看到 Google Cloud Shell 的实例名称。

是否可以通过 Google Cloud Shell 访问永久磁盘?如果不是,我如何才能访问我创建的 Persistent Volume?

最佳答案

是的,所有磁盘都需要附加到一个实例才能访问它们 - 您需要创建一个计算实例并使用 gcloud compute instances attach-disk [INSTANCE_NAME] --disk [DISK_NAME] 挂载永久磁盘.

创建新实例后,您可以通过运行 gcloud compute instances list 看到实例名称以供使用。

然后,您将能够通过 ssh 进入实例并安装它来访问磁盘。

以下将有助于安装:

https://cloud.google.com/compute/docs/disks/add-persistent-disk

关于kubernetes - 对 Google Cloud 中的 Persistent Volume 的 Shell 访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43134522/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com