k8s 查看 deployment可用存储
时间: 2023-07-28 09:29:14 浏览: 162
你可以通过以下步骤来查看 Kubernetes 中 Deployment 可用的存储:
1. 使用 kubectl 命令查看 Deployment 的详细信息:
```
kubectl describe deployment <deployment-name>
```
2. 在 Deployment 的详细信息中查找 `Volumes` 字段,这个字段会列出 Deployment 中定义的所有存储卷。例如:
```
Volumes:
- name: my-volume
persistentVolumeClaim:
claimName: my-pvc
```
3. 查看 `persistentVolumeClaim` 字段中的 `claimName` 属性,它指向了一个 PVC(Persistent Volume Claim),表示该 Deployment 中使用了这个 PVC 对象来请求存储资源。
4. 使用 kubectl 命令查看 PVC 的详细信息:
```
kubectl describe pvc <pvc-name>
```
5. 在 PVC 的详细信息中查看 `Volume Name` 字段,它指向了一个 PV(Persistent Volume),表示该 PVC 已经被绑定到了这个 PV 对象上。
6. 使用 kubectl 命令查看 PV 的详细信息:
```
kubectl describe pv <pv-name>
```
7. 在 PV 的详细信息中查看 `Capacity` 字段,它表示该 PV 可用的存储容量。
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231044955.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)