0

I am running Knative on a GKE cluster. The sample images provided on the Knative website work but when I switch to some other images, it stops working. Only 2 containers work out of 3 and route's ready state remains 'unknown' and Reason shows as 'RevisionMissing'.

I tried with multiple images, k8s.gcr.io/hpa-example is one of them.

Edit: The cluster has a two-node of configuration of type n1-standard-4 (4 vCPUs, 15 GB memory). I created this cluster using the GCP console with the latest version of kubernetes, and checking the Enable Istio checkbox. I used following commands to install the Knative:

kubectl apply --selector knative.dev/crd-install=true \
-f https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml \
-f https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml \
-f https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml

kubectl apply \
-f https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml \
-f https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml \
-f https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml

Thanks

Pragmatic
  • 3,093
  • 4
  • 33
  • 62

2 Answers2

1

Ok, I found the problem. I tried posting custom images. All worked until I change the port (inside image) to 80. This image not only work as Knative service, but also, It did not work on Cloud run service as well. Bottom line is, either pull port number from environment variable, or hard code it to any other port than 80.

Pragmatic
  • 3,093
  • 4
  • 33
  • 62
0

Thanks for the precisions.

When you installed Knative you should see this kind of errors

# Without CRD 
unable to recognize "https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml": no matches for kind "Gateway" in version "networking.istio.io/v1alpha3"
unable to recognize "https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml": no matches for kind "Gateway" in version "networking.istio.io/v1alpha3"
unable to recognize "https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml": no matches for kind "Image" in version "caching.internal.knative.dev/v1alpha1"
unable to recognize "https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml": no matches for kind "ClusterChannelProvisioner" in version "eventing.knative.dev/v1alpha1"


# Without CRD 
Error from server (NotFound): error when creating "https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml": namespaces "istio-system" not found
Error from server (NotFound): error when creating "https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml": namespaces "istio-system" not found
Error from server (NotFound): error when creating "https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml": namespaces "istio-system" not found
Error from server (NotFound): error when creating "https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml": namespaces "istio-system" not found

You didn't have installed Istio. Do it, relaunch the knative installation (with and without CRD) to solve previous errors and enjoy!!!

guillaume blaquiere
  • 66,369
  • 2
  • 47
  • 76
  • Dear gillaume, I forgot to mention explicitly (and now edited) that cluster was created with Istio (GCP provide a checkbox to enable that). Also, there were no errors while installing knative. And please read the question again. I am able to create knative services (which internally creates configuration, route and revisions) with images shared on knative websites (in sample). But if I use any different image, it does not work. Virtual service does not get created and route shows 'RevisionMissing' error. – Pragmatic Sep 04 '19 at 06:35
  • When I used knative without istio, I have the exact same behavior. – guillaume blaquiere Sep 04 '19 at 06:47
  • Istio is a mandatory prerequisite. There is no point in testing it without istio. – Pragmatic Sep 04 '19 at 06:51
  • 1
    Except is you aren't aware of the prerequisite, like me, the first time that I tested knative. I just shared my personal fails! – guillaume blaquiere Sep 04 '19 at 06:58