Error while creating projects using openshift templates

10/3/2018

I have created a template for my project on openshift, but when I pass the parameters and create the project it get a pop up like the following.

This is the error I am getting

ERROR:

**Some resources will not be created: The following resource versions are not supported by the server: API version v1 for kind persistent volume claim**

Seems like the PVC version is not compatible. While earlier, I used the same PVC object and it used to work fine.

This is the pvc resource I am trying to create

{
    "apiVersion": "v1",
    "kind": "PersistentVolumeClaim",
    "metadata": {
        "name": "mongodb",
        "annotations":{
            "volume.beta.kubernetes.io/storage-class":"innershift-storage"
          }
    },
    "spec": {
        "accessModes": ["ReadWriteOnce"],
        "resources": {
            "requests": {
                "storage": "1Gi"
            }
        }

    }
}

I tried to create the same PVC resource using REST API, and it worked. But it doesn't work when I pass parameters in the template.

What could be the possible reason?

-- Ayush Ojha
kubernetes
kubernetes-pvc
openshift
openshift-origin
redhat

0 Answers