Error: unable to recognize “mongo-configmap.yaml”: no matches for kind “ConfigMap” in version “V1”

Hi,
i am following a mongodb tutorial on kubernetes but when i create the config map it gives me this error

error: unable to recognize "mongo-configmap.yaml": no matches for kind "ConfigMap" in version "V1"

this is the mongo-configmap.yaml file

    apiVersion: V1
    kind: ConfigMap
    metadata:
      name: mongodb-configmap
    data:
      database_url: mongodb-service

Have you tried using lowercase V (v) for the apiVersion?

1 Like

Ok its work!!!