serving icon indicating copy to clipboard operation
serving copied to clipboard

no matches for kind "Service" in version "serving.knative.dev/v1alpha1"

Open lee-zhg opened this issue 6 years ago • 6 comments

Ask your question here:

I am runninig OpenShift on IBM Kubernetes and run into an issue while doing Tekton source to image. See the error below:

{"level":"info","ts":1595695946.3672152,"logger":"fallback-logger","caller":"logging/config.go:69","msg":"Fetch GitHub commit ID from kodata failed: "KO_DATA_PATH" does not exist or is empty"} error: unable to recognize "/workspace/git-source/knative/picalc.yaml": no matches for kind "Service" in version "serving.knative.dev/v1alpha1"

Below is my .yaml file:

apiVersion: serving.knative.dev/v1alpha1 kind: Service metadata: name: picalc namespace: default spec: runLatest: configuration: revisionTemplate: spec: container: image: IMAGE

Then, I tested with command "kubectl apply -f my.yaml" and got the same error. I also tried "apiVersion: serving.knative.dev/v1" and "apiVersion: serving.knative.dev/v1beta1". Got the same error.

Per serving.knative.dev/v1alpha1 spec at https://knative.dev/docs/reference/serving-api/#serving.knative.dev/v1alpha1.Service, "Service" type should be available.

Please help.

Thank you Lee

lee-zhg avatar Jul 25 '20 18:07 lee-zhg

How did you install Knative in your Openshift cluster?

markusthoemmes avatar Jul 27 '20 06:07 markusthoemmes

@lee-zhg Any more info here? otherwise we'll close on next pass.

mattmoor avatar Aug 18 '20 02:08 mattmoor

@markusthoemmes @mattmoor

I am getting same error as below. Install knative on RKE Cluster.

error: unable to recognize "v1.yaml": no matches for kind "Service" in version "serving.knative.dev/v1alpha1"

=============================== apiVersion: serving.knative.dev/v1alpha1 kind: Service metadata: name: canary spec: runLatest: configuration: revisionTemplate: spec: container: image: gcr.io/knative-samples/knative-route-demo:blue env: - name: T_VERSION value: "blue"

===============================

If i change to apiVersion to v1, then i get below error.

error: error validating "v1.yaml": error validating data: ValidationError(Service.spec): unknown field "runLatest" in dev.knative.serving.v1.Service.spec; if you choose to ignore these errors, turn validation off with --validate=false

sudharsanomprakash avatar Dec 02 '21 19:12 sudharsanomprakash

That schema was deprecated and removed a long time ago. Where did you find it, so we can try to get that fixed?

mattmoor avatar Dec 02 '21 21:12 mattmoor

I want to test "serving multiple versions simultaneously" in my cluster to ensure things are working as expected and for that i am using reference from google codelabs - https://codelabs.developers.google.com/codelabs/knative-intro#8

sudharsanomprakash avatar Dec 03 '21 16:12 sudharsanomprakash

cc @ZhiminXiang

mattmoor avatar Dec 03 '21 16:12 mattmoor