2023. 2. 22. 14:39ㆍDev
Kubernetes Pod Warning: 1 node(s) had volume node affinity conflict
Warning FailedScheduling 3m14s (x3 over 7m7s) default-scheduler 0/2 nodes are available: 1 node(s) didn't match Pod's node affinity/selector, 1 node(s) had volume node affinity conflict. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
Warning ProvisioningFailed 2m16s (x9 over 6m31s) ebs.csi.aws.com_ebs-csi-controller-6847c46b4d-cpm4f_bfed70e9-03b9-4d92-8a72-a7f9b9052f01 failed to provision volume with StorageClass "gp3": error generating accessibility requirements: topology map[topology.ebs.csi.aws.com/zone:ap-northeast-2c] from selected node "ip-192-168-152-73.ap-northeast-2.compute.internal" is not in requisite: [map[failure-domain.beta.kubernetes.io/zone:ap-northeast-2a] map[failure-domain.beta.kubernetes.io/zone:ap-northeast-2c]]
위 글을 답변을 참고해서 gp3 storageclass에 allowedTopologies 추가하고 재시작해서 성공
allowVolumeExpansion: true
allowedTopologies:
- matchLabelExpressions:
- key: topology.ebs.csi.aws.com/zone
values:
- ap-northeast-2a
- ap-northeast-2c
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"allowVolumeExpansion":true,"allowedTopologies":[{"matchLabelExpressions":[{"key":"failure-domain.beta.kubernetes.io/zone","values":["ap-northeast-2a","ap-northeast-2c"]}]}],"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"},"creationTimestamp":"2023-01-13T04:10:30Z","name":"gp3","resourceVersion":"1647","uid":"88b537ab-9fc3-4b95-88f4-dea0e671cf26"},"parameters":{"csi.storage.k8s.io/fstype":"ext4","type":"gp3"},"provisioner":"ebs.csi.aws.com","reclaimPolicy":"Delete","volumeBindingMode":"WaitForFirstConsumer"}
storageclass.kubernetes.io/is-default-class: "true"
creationTimestamp: "2023-01-13T04:10:30Z"
name: gp3
resourceVersion: "13369982"
uid: 88b537ab-9fc3-4b95-88f4-dea0e671cf26
parameters:
csi.storage.k8s.io/fstype: ext4
type: gp3
provisioner: ebs.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
https://pet2cattle.com/2022/04/volume-affinity-conflict
'Dev' 카테고리의 다른 글
find log where string does not exist, with grep -iv (0) | 2023.04.25 |
---|---|
Kubernetes Dashboard Token Expired Issue (0) | 2023.03.21 |
2023년 AWS 시험 프로모션 코드 (0) | 2023.02.20 |
윈도우 wsl2 터미널 창 분할 단축키 (0) | 2023.02.10 |
AWS EC2에서 curl을 이용한 RDS 접근 확인 (0) | 2023.01.16 |