gpt4 book ai didi

kubernetes - 在主机文件系统上哪里可以找到Kubernetes PV?

转载 作者:行者123 更新时间:2023-12-02 11:35:28 25 4
gpt4 key购买 nike

我正在尝试了解Kubernetes如何处理节点文件系统上的持久卷。

例如,如果我有一个minikube作为我的Kubernetes集群节点,并且我用PVC为may pod创建了多个PV,并且我通过ssh到minikube,在哪里可以在minikube的文件系统上找到PV?

如果我输入

lsblk



我懂了

sda 8:0 0 19.5G 0 disk



但没有列出PV磁盘。

谢谢您的回答。

最佳答案

您不会看到它,因为它作为API对象位于API内。
我建议阅读有关Persistent Volumes的Kubernetes文档。

A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual pod that uses the PV. This API object captures the details of the implementation of the storage, be that NFS, iSCSI, or a cloud-provider-specific storage system.

A PersistentVolumeClaim (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes (e.g., can be mounted once read/write or many times read-only).

While PersistentVolumeClaims allow a user to consume abstract storage resources, it is common that users need PersistentVolumes with varying properties, such as performance, for different problems. Cluster administrators need to be able to offer a variety of PersistentVolumes that differ in more ways than just size and access modes, without exposing users to the details of how those volumes are implemented. For these needs there is the StorageClass resource.

Please see the detailed walkthrough with working examples.


您还可以查看 Kubernetes Volumes Guide,它说明了存储类型,它们可以使用多长时间以及如何在示例中使用它们。

关于kubernetes - 在主机文件系统上哪里可以找到Kubernetes PV?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55807418/

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