LoginSignup
0
0

StatefulSet in version "v1" cannot be handled as a StatefulSetエラーの原因がTypoだった(のに気が付かず時間を取られた)

Posted at

Error from server (BadRequest): error when creating "xxxxxxx.yml": StatefulSet in version "v1" cannot be handled as a StatefulSet: strict decoding error: unknown field "spec.selector.matchlabels", unknown field "spec.template.spec.volumeClaimTemplates"

上記エラーが出たので、StatefulSetのApp version関係かと思ってググっていたが、全く解決せず。
Indentが問題になることもあるようなので、何回も見直したが間違いは見つからず。。

原因は単なるTypo。大文字で書かなければいけないmatcLabelsを間違えてmatchlabelsと書いていただけでした。

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: test
  namespace: default
  labels:
    app: test-app
spec:
  selector:
    matchlabels:   <<< このTypoが原因。matchLabelsに書き換えたら問題解決。

無駄な時間を取られたが、こんなエラーパターンがあることは覚えておくことにします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0