最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

dns - knative service is unable to open external url by name (explicit IP is ok) - Stack Overflow

programmeradmin1浏览0评论

I have followed basic Knative setup recomended by official

So now i have:

  • minikube on WSL2
  • kourier
  • knative

After that I have simple python script on top of Flask to listen POST method and access external url like

Current observation:

  • Python script works well under docker dry-run;
  • Python script works if address specified by explicit IP: under Knative triggering by curl -X POST -H "host..." http:/127.0.0.1" -H "Content-Type: application/json" -d '{"url":"http://192.168.1.1"}'
  • Pythin script fails if url contains names aka curl -X POST -H "host..." http:/127.0.0.1" -H "Content-Type: application/json" -d '{"url":";}':

Failed to fetch URL: HTTPConnectionPool(host='example', port=80): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fe471b0a900>: Failed to resolve 'example' ([Errno -5] Name has no usable address)"))"

What I have already tried to do:

  • Per official doc: networking.knative.dev/http-protocol: "enabled"
  • Also allow HTTP 1.1 duplex (don't think it is ever relevant).
    metadata:
      annotations:
        features.knative.dev/http-full-duplex: "Enabled"
发布评论

评论列表(0)

  1. 暂无评论