C
C
CanisLupusMSK2020-11-25 18:15:24
linux
CanisLupusMSK, 2020-11-25 18:15:24

Why does the PersistentVolumeClaim error occur?

Good afternoon, the error occurs when adding PersistentVolumeClaim, there is no such thing in other yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: claim
spec:
  accessModes:
    - ReadWriteOnce
  volumeMode: Filesystem
  resources:
    requests:
      storage: "5Gi"
      storageClassName: "standart"
  volumeName: pvnginx

What kubernetes throws:
Error from server (BadRequest): error when creating pvc.yaml : PersistentVolumeClaim in version vl " cannot be handled as a PersistentVolumeClaim: vl.PersistentVolumeClaim.Spec: vl.PersistentVolumeCl aimSpec.VolumeMode: Resources: vl.ResourceRequirements.Requests : unmarmarrrrrrrrrr |L [-? [-? []] + match)([eEincoderrrMasters] *[-+.]? [0-9] *)', error found in #10 byte e of ...|"standart"}},"volume|..., bigger context ... Its":{"storage":"5Gi","storageClassName":"stand art"}},"volumeMode ":"Filesystem","volumeName":"pvnginx|...

Kuber version 1.18.12, installed on local machine, no clouds.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Vasilyev, 2020-11-25
@CanisLupusMSK

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: claim
spec:
  accessModes:
    - ReadWriteOnce
  volumeMode: Filesystem
  resources:
    requests:
      storage: 5Gi
  storageClassName: standart
  volumeName: pvnginx

V
Vitaly Karasik, 2020-11-25
@vitaly_il1

storage: "5Gi"

remove the quotes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question