gcloud计算磁盘调整大小后,调整gkePersistentDisk Pod卷的大小 [英] Resize a gkePersistentDisk pod volume after gcloud compute disks resize
问题描述
通过GKE创建的体积可以使用gcloud compute disks resize [volume name from kubectl get pv]
轻松调整大小.吊舱将继续运行.
Volumes created through GKE can easily be resized using gcloud compute disks resize [volume name from kubectl get pv]
. The pod will keep running.
但是,窗格中的df
仍会报告相同的大小.更重要的是,kubectl describe pv
仍将报告原始的容量".有没有办法在该卷上增加Pod的实际存储空间?
However a df
in the pod will still report the same size. More importantly kubectl describe pv
will still report the original "capacity". Is there a way to grow the pod's actual storage space on the volume?
根据 https://github的说法,官方支持可能会在路线图中. com/kubernetes/kubernetes/issues/24255#issuecomment-210227126 ,但是讨论在哪里进行?
Official support may be in the roadmap, according to https://github.com/kubernetes/kubernetes/issues/24255#issuecomment-210227126, but where is that discussion taking place?
推荐答案
通常,吊舱中的容器设计为临时容器.如果这是您的部署设计,那么请终止该Pod,并在Pod重新启动后,以正确的大小将其重新连接到gcePersistentDisk.
Usually containers in pods are designed to be ephemeral. If this is the design of your deployment then kill the pod and once the pod restarts it should reattach to the gcePersistentDisk with the correct size.
这篇关于gcloud计算磁盘调整大小后,调整gkePersistentDisk Pod卷的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!