Kubernetes Pod Warning: 1 node(s) had volume node affinity conflict

前端 未结 7 3911
一向
一向 2020-12-14 14:24

I try to set up Kubernetes cluster. I have Persistent Volume, Persistent Volume Claim and Storage class all set-up and running but when I wan to create pod from deployment,

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-14 15:09

    Great answer by Sownak Roy. I've had the same case of a PV being created in a different zone compared to the node that was supposed to use it. The solution I applied was based on Sownak's answer only in my case it was enough to specify the storage class without the "allowedTopologies" list, like this:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: cloud-ssd
    provisioner: kubernetes.io/aws-ebs
    parameters:
      type: gp2
    volumeBindingMode: WaitForFirstConsumer
    

提交回复
热议问题