FargateプロファイルとNodeSelectorが矛盾しているとPodがPendingのままになる
Fargateプロファイル
Namespece: foo
Label: app.kubernetes.io/name: bar
Pod
code:yaml
apiVersion: v1
kind: Pod
metadata:
labels:
app.kubernetes.io/name: bar
namespace: foo
name: baz
spec:
nodeSelector:
nodeType: qux
このとき
nodeType: quxラベルを持つワーカーノードがクラスターに存在すると、
PodはPendingのまま起動しなくなる。
PodをdescribeしてもEvents: <none>のまま。
metadata.labels.eks.amazonaws.com/fargate-profileは追加されている。
metadata.annotations.CapacityProvisionedは追加されていない。
spec.nodeNameは追加されていない。
Podのstatus.conditionsにメッセージが出る。
message: 'MatchNodeSelector failed: Fargate profile example cannot satisfy pod''s node selector/affinity requirements'
reason: MATCH_NODE_SELECTOR_FAILED
status: "False"