Deploy Kubeflow pipelines iz throwing "Failed to create CustomResourceDefinition."

6/2/2021

I have created a new GKE Cluster in the region 'us-west-1' and gave full access to the cloud services. I want to deploy the kubeflow pipeline on the cluster. I am getting the following error when I click the deploy button...

Error: Failed to create CustomResourceDefinition.

{"metadata":{},"status":"Failure","message":"CustomResourceDefinition.apiextensions.k8s.io \"applications.app.k8s.io\" is invalid: [spec.versions[0].schema.openAPIV3Schema: Required value: schemas are required, spec.versions: Invalid value: []apiextensions.CustomResourceDefinitionVersion{apiextensions.CustomResourceDefinitionVersion{Name:\"v1beta1\", Served:false, Storage:false, Schema:(*apiextensions.CustomResourceValidation)(nil), Subresources:(*apiextensions.CustomResourceSubresources)(nil), AdditionalPrinterColumns:[]apiextensions.CustomResourceColumnDefinition(nil)}}: must have exactly one version marked as storage version, status.storedVersions: Invalid value: []string(nil): must have at least one stored version, metadata.annotations[api-approved.kubernetes.io]: Required value: protected groups must have approval annotation \"api-approved.kubernetes.io\", see https://github.com/kubernetes/enhancements/pull/1111]","reason":"Invalid","details":{"name":"applications.app.k8s.io","group":"apiextensions.k8s.io","kind":"CustomResourceDefinition","causes":[{"reason":"FieldValueRequired","message":"Required value: schemas are required","field":"spec.versions[0].schema.openAPIV3Schema"},{"reason":"FieldValueInvalid","message":"Invalid value: []apiextensions.CustomResourceDefinitionVersion{apiextensions.CustomResourceDefinitionVersion{Name:\"v1beta1\", Served:false, Storage:false, Schema:(*apiextensions.CustomResourceValidation)(nil), Subresources:(*apiextensions.CustomResourceSubresources)(nil), AdditionalPrinterColumns:[]apiextensions.CustomResourceColumnDefinition(nil)}}: must have exactly one version marked as storage version","field":"spec.versions"},{"reason":"FieldValueInvalid","message":"Invalid value: []string(nil): must have at least one stored version","field":"status.storedVersions"},{"reason":"FieldValueRequired","message":"Required value: protected groups must have approval annotation \"api-approved.kubernetes.io\", see https://github.com/kubernetes/enhancements/pull/1111","field":"metadata.annotations[api-approved.kubernetes.io]"}]},"code":422} 

I have left all the other fields default and not accessing any database.

This is my first project using GCP. Any help is much appreciated.

-- Priya
gcp-ai-platform-training
google-cloud-platform
kubernetes
python-3.x

1 Answer

6/3/2021

Which version of Kubernetes you are running in your cluster.

Error you are getting is due to wrong API version in CRD files

you can check the supported API version of your kubernetes by running the command :

kubectl api-resources

enter image description here

check the CRD supported API version

apiextensions.k8s.io

update supported API version in file and try applying same.

kube-flow also provide the way to validate the necessary all API first

you can check at : https://github.com/kubeflow/crd-validation

-- Harsh Manvar
Source: StackOverflow