gpt4 book ai didi

kubernetes - host_path 删除器只支持/tmp/.+ 但接收提供/mnt/disk/kafka

转载 作者:行者123 更新时间:2023-12-02 12:14:53 32 4
gpt4 key购买 nike

我正在尝试删除一个持久卷,从将一个用过的 kafka 集群划入 kubernetes 开始,我将保留模式更改为删除,它是保留。但是我无法删除三卷中的两卷:

[yo@machine kafka_k8]$ kubectl describe pv kafka-zk-pv-0
Name: kafka-zk-pv-0
Labels: type=local
StorageClass:
Status: Failed
Claim: kafka-ns/datadir-0-poc-cp-kafka-0
Reclaim Policy: Delete
Access Modes: RWO
Capacity: 500Gi
Message: host_path deleter only supports /tmp/.+ but received provided /mnt/disk/kafka
Source:
Type: HostPath (bare host directory volume)
Path: /mnt/disk/kafka
Events:
{persistentvolume-controller } Warning
VolumeFailedDelete host_path deleter only supports /tmp/.+ but received provided /mnt/disk/kafka

最佳答案

我将策略“保留”更改为“回收”,现在可以重新创建卷。

kubectl patch pv kafka-zk-pv-0 -p '{"spec":{"persistentVolumeReclaimPolicy":"Recycle"}}'

关于kubernetes - host_path 删除器只支持/tmp/.+ 但接收提供/mnt/disk/kafka,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58164022/

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