0

I am new to knative. I have installed minikube for cluster support and all the required tools for knative . While creating the service in reference of this: https://knative.dev/docs/serving/getting-started-knative-app/

I am getting below output:

  1. Create service command output as expected):

kn service create helloworld-go --image gcr.io/knative-samples/helloworld-go --env TARGET="Go Sample v1"

Creating service 'helloworld-go' in namespace 'default':

0.047s The Configuration is still working to reflect the latest desired specification. 0.407s The Route is still working to reflect the latest desired specification. 0.522s Configuration "helloworld-go" is waiting for a Revision to become ready. 12.683s ... 12.882s Ingress has not yet been reconciled. 15.143s Ready to serve.

Service 'helloworld-go' created to latest revision 'helloworld-go-yvtlp-1' is available at URL: http://helloworld-go.default.mydomain.com

  1. This is my service:

kn service describe helloworld-go

Name: helloworld-go Namespace: default Age: 18s URL: http://helloworld-go.default.mydomain.com

Revisions: 100% @latest (helloworld-go-yvtlp-1) [1] (18s) Image: gcr.io/knative-samples/helloworld-go (pinned to 5ea96b)

Conditions: OK TYPE AGE REASON ++ Ready 3s ++ ConfigurationsReady 5s ++ RoutesReady 3s

  1. But when I am trying to curl it's giving me error:

curl http://helloworld-go.default.mydomain.com -v

  • Could not resolve host: helloworld-go.default.mydomain.com
  • Closing connection 0 curl: (6) Could not resolve host: helloworld-go.default.mydomain.com

Can somebody help?

2 Answers2

0

I'm guessing that you don't control the DNS for mydomain.com​. In that case, you'll need to issue a command like:

curl -H "Host: helloworld-go.default.mydomain.com" $INGRESS_IP​

You may need to use minikube tunnel to get an ingress IP on minikube.

This is described here under the "temporary DNS" section of "Configure DNS":

https://knative.dev/docs/install/any-kubernetes-cluster/

E. Anderson
  • 3,405
  • 1
  • 16
  • 19
  • Yes, you're right. I am not controlling the mydomain.com but before this I was getting example.com to fix that I did this change.To try with you suggestion: (1) echo $(minikube ip):$(kubectl get svc $INGRESSGATEWAY --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}') 192.168.49.2:32698 (2) curl -H "Host:http://helloworld-go.default.mydomain.com" http://192.168.49.2:32698 -v =>curl: (7) Failed to connect to 192.168.49.2 port 32698: Operation timed out – rutva patel Mar 05 '21 at 14:11
  • It looks like your'e trying to connect to the Istio gateway; have you verified that you can reach Istio at all? – E. Anderson Mar 05 '21 at 18:13
  • How to verify that? – rutva patel Mar 05 '21 at 19:01
  • I'm trying this thing to verify: https://istio.io/latest/docs/setup/getting-started/#download – rutva patel Mar 05 '21 at 20:19
0

After applying so many solution this one worked for me:

If you are getting this error then something is wrong with you GATEWAY.

To resolve that thing: try to deploy demo application from istio : https://istio.io/latest/docs/tasks/traffic-management/ingress/ingress-control/

It will fix your gateway issue and you can successfully deploy your application using knative.

[NOTE: If you are using minikube you can first try https://istio.io/latest/docs/setup/getting-started/#download may be this could work for you.]

All the best

  • 1
    your curl error has nothing to do with the gateway. It just means DNS didn't return any IP address for that host. And it probably was because you sent your requests to `helloworld-go.default.mydomain.com`, and may be should have sent to `helloworld-go.default.svc.mydomain.com`. And that request actually wouldn't go to through the gateway. If you are making this request from outside cluster, that's what you should expect. I don't know how this resolves your issue, but if you want to get to the bottom, you should revert your configuration to the point that it fails, and solve it. – suren Mar 07 '21 at 09:52