Serving: Cluster-local-gateway in configmap-domain does not work as expected.

Created on 15 Jun 2020  路  2Comments  路  Source: knative/serving

In what area(s)?

/area networking

What version of Knative?

0.11.1

Expected Behavior

I am trying to deploy the helloworld-go sample application using the cluster-local-gateway. When I use the label serving.knative.dev/visibility: cluster-local it works, but when I set the default domain to svc.cluster.local in config-domain it does not. I am using Istio 1.3.1.

Actual Behavior

The service status is stuck at IngressNotConfigured.

Steps to Reproduce the Problem

config-domain configmap:

apiVersion: v1
data:
  svc.cluster.local: ''
kind: ConfigMap
  labels:
    serving.knative.dev/release: v0.11.1
  name: config-domain
  namespace: knative-serving
  resourceVersion: '17021'

I now deploy two sample apps, one with the label, and one without:

apiVersion: serving.knative.dev/v1 # Current version of Knative
kind: Service
metadata:
  name: helloworld-go # The name of the app
  namespace: default # The namespace the app will use
  # labels:
  #   serving.knative.dev/visibility: cluster-local
spec:
  template:
    spec:
      containers:
        - image: gcr.io/knative-samples/helloworld-go # The URL to the image of the app
          env:
            - name: TARGET # The environment variable printed out by the sample app
              value: "Go Sample v1"
---
apiVersion: serving.knative.dev/v1 # Current version of Knative
kind: Service
metadata:
  name: helloworld-go-labels # The name of the app
  namespace: default # The namespace the app will use
  labels:
    serving.knative.dev/visibility: cluster-local
spec:
  template:
    spec:
      containers:
        - image: gcr.io/knative-samples/helloworld-go # The URL to the image of the app
          env:
            - name: TARGET # The environment variable printed out by the sample app
              value: "Go Sample v1"

The one with the label becomes ready, the one without does not:

$ k get ksvc                                                                                                                                                          
NAME                   URL                                                     LATESTCREATED                LATESTREADY                  READY     REASON
helloworld-go          http://helloworld-go.default.svc.cluster.local          helloworld-go-5tpfc          helloworld-go-5tpfc          Unknown   IngressNotConfigured
helloworld-go-labels   http://helloworld-go-labels.default.svc.cluster.local   helloworld-go-labels-5dq6q   helloworld-go-labels-5dq6q   True

When I curl from a pod inside the cluster, the one with the label functions, the other one does not:

root@istio-pilot-bc7984c64-mrrsx:/# curl http://helloworld-go.default.svc.cluster.local
curl: (6) Could not resolve host: helloworld-go.default.svc.cluster.local
root@istio-pilot-bc7984c64-mrrsx:/# curl http://helloworld-go-labels.default.svc.cluster.local
Hello Go Sample v1!
arenetworking kinbug

All 2 comments

Hi @larssuanet Thank you for opening this.

What version of Knative?
0.11.1

Unfortunately it is a known issue on Knative 0.12 or before. It was reported by https://github.com/knative/serving/issues/6702 and fixed by https://github.com/knative/serving/commit/b0c2013b48e86d9ebefb5f5a9c773d0c1cee1c0f.
It seems that v0.13.0 or later fixed it so could you please update your Knative version?

Hi @nak3,

Thanks for the quick response. I upgraded to v0.13.0 and got it to work. Thanks!

Was this page helpful?
0 / 5 - 0 ratings