小编Ale*_*www的帖子

如何将PV从一个kubernetes节点移动到另一个节点

我有一个使用 rancher.io/local-path 的 k8s 集群。那里有PV


    $ kubectl describe pv pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f
    Name:              pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f
    Labels:            <none>
    Annotations:       pv.kubernetes.io/provisioned-by: rancher.io/local-path
    Finalizers:        [kubernetes.io/pv-protection]
    StorageClass:      local-path
    Status:            Bound
    Claim:             gitlab/gitlab-prometheus-server
    Reclaim Policy:    Delete
    Access Modes:      RWO
    VolumeMode:        Filesystem
    Capacity:          8Gi
    Node Affinity:     
      Required Terms:  
        Term 0:        kubernetes.io/hostname in [agent-1]
    Message:           
    Source:
        Type:          HostPath (bare host directory volume)
        Path:          /var/lib/rancher/k3s/storage/pvc-979af6ff-3617-4707-8a2c-b6c4ac00043f_gitlab_gitlab-prometheus-server
        HostPathType:  DirectoryOrCreate
    Events:            <none>

Run Code Online (Sandbox Code Playgroud)

我想将该 PV 移动到另一个节点,agetn-5。我怎样才能做到这一点?重要的一点是,所讨论的 PV 已被rancher.io/local-path配置。

kubernetes rancher

7
推荐指数
1
解决办法
1863
查看次数

标签 统计

kubernetes ×1

rancher ×1