You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/11/01 03:52:18 UTC

[GitHub] [apisix-ingress-controller] lxm opened a new issue #729: request help: apisixroute not work

lxm opened a new issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729


   ### apisixroute not work
   ### Environment
   
   * your apisix-ingress-controller version 1.3.0
   * your Kubernetes cluster version : v1.18.8-aliyun.1
   * aliyun linux
   
   content of apisixroute
   ```
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
     name: qingjiao-apiv2
     namespace: qingjiao-main-prod
   spec:
     http:
     - name: api
       match:
         hosts:
         - api.domain.test
         paths:
         - "/api*"
       backends:
        - serviceName: prod-qingjiao-api
          servicePort: 80
   ```
   
   
   err msg 
   
   
   ```
   2021-11-01T11:21:34+08:00 error translation/apisix_route.go:184 failed to get service port in backend {"backend": {"serviceName":"","servicePort":0,"weight":null}, "apisix_route": {"metadata":{"name":"qingjiao-apiv2","namespace":"qingjiao-main-prod","selfLink":"/apis/apisix.apache.org/v2beta1/namespaces/qingjiao-main-prod/apisixroutes/qingjiao-apiv2","uid":"7615120a-f0c8-4ad3-b8b5-983eac8aebee","resourceVersion":"2219214738","generation":1,"creationTimestamp":"2021-11-01T03:05:22Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apisix.apache.org/v2beta1\",\"kind\":\"ApisixRoute\",\"metadata\":{\"annotations\":{},\"name\":\"qingjiao-apiv2\",\"namespace\":\"qingjiao-main-prod\"},\"spec\":{\"http\":[{\"backend\":{\"serviceName\":\"prod-qingjiao-api\",\"servicePort\":80},\"match\":{\"hosts\":[\"api.domain.test\"],\"paths\":[\"/api*\"]},\"name\":\"api\"}]}}\n"},"managedFields":[{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion
 ":"apisix.apache.org/v2beta1","time":"2021-11-01T03:05:22Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:spec":{".":{},"f:http":{}}}}]},"spec":{"http":[{"name":"api","match":{"paths":["/api*"],"hosts":["api.domain.test"]},"backend":{"serviceName":"","servicePort":0,"weight":null},"websocket":false,"authentication":{"enable":false,"type":"","keyauth":{}}}]},"status":{"conditions":[{"type":"ResourcesAvailable","status":"False","lastTransitionTime":"2021-11-01T03:05:23Z","reason":"ResourceSyncAborted","message":"service \"\" not found"}]}}, "error": "service \"\" not found"}
   
   2021-11-01T11:21:34+08:00 error ingress/apisix_route.go:226 failed to translate old ApisixRoute {"version": "apisix.apache.org/v2beta1", "event": "update", "error": "service \"\" not found", "ApisixRoute": {}}
   
   2021-11-01T11:21:34+08:00 warn ingress/apisix_route.go:292 sync ApisixRoute failed, will retry {"object": {"Type":2,"Object":{"Key":"qingjiao-main-prod/qingjiao-apiv2","OldObject":{},"GroupVersion":"apisix.apache.org/v2beta1"},"Tombstone":null}, "error": "service \"\" not found"}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] lxm commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
lxm commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-955905897


   E1101 11:58:20.268958 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.Ingress: failed to list *v1.Ingress: the server could not find the requested resource


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] lxm commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
lxm commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956125167


   and the controller continues output a errror `E1101 18:32:56.227617 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.Ingress: failed to list *v1.Ingress: the server could not find the requested resource`
   
   if create  a ingress with class name `apisix`, it won't be processed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956073847


   The Route version that apisix-ingress-controller watches is `v2beta`, according to the log message:
   
   > 2021-11-01T11:21:34+08:00 error translation/apisix_route.go:184 failed to get service port in backend {"backend": {"serviceName":"","servicePort":0,"weight":null}, "apisix_route": {"metadata":{"name":"qingjiao-apiv2","namespace":"qingjiao-main-prod","selfLink":"/apis/apisix.apache.org/v2beta1/namespaces/qingjiao-main-prod/apisixroutes/qingjiao-apiv2","uid":"7615120a-f0c8-4ad3-b8b5-983eac8aebee","resourceVersion":"2219214738","generation":1,"creationTimestamp":"2021-11-01T03:05:22Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apisix.apache.org/v2beta1\",\"kind\":\"ApisixRoute\",\"metadata\":{\"annotations\":{},\"name\":\"qingjiao-apiv2\",\"namespace\":\"qingjiao-main-prod\"},\"spec\":{\"http\":[{\"backend\":{\"serviceName\":\"prod-qingjiao-api\",\"servicePort\":80},\"match\":{\"hosts\":[\"api.domain.test\"],\"paths\":[\"/api*\"]},\"name\":\"api\"}]}}\n"},"managedFields":[{"manager":"kubectl-client-side-apply","operation":"Update","apiVersi
 on":"**apisix.apache.org/v2beta1**","time":"2021-11-01T03:05:22Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:spec":{".":{},"f:http":{}}}}]},"spec":{"http":[{"name":"api","match":{"paths":["/api*"],"hosts":["api.domain.test"]},"backend":{"serviceName":"","servicePort":0,"weight":null},"websocket":false,"authentication":{"enable":false,"type":"","keyauth":{}}}]},"status":{"conditions":[{"type":"ResourcesAvailable","status":"False","lastTransitionTime":"2021-11-01T03:05:23Z","reason":"ResourceSyncAborted","message":"service \"\" not found"}]}}, "error": "service \"\" not found"}
   
   You should use the `v2beta2` as the watching version (see [here](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-ingress-controller/templates/configmap.yaml#L36)).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] jikunchong commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
jikunchong commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-962544316


   通过插件应该可以 rewrite 到 /api 子路径下,但我也想知道能不能直接在 ingress rule 中,就可以搞定。
   类似 ingress nginx 的 nginx.ingress.kubernetes.io/rewrite-target: / 那样。求解答 ~~
   参考:https://apisix.apache.org/docs/apisix/plugins/proxy-rewrite


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-957273300


   > and the controller continues output a errror `E1101 18:32:56.227617 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.Ingress: failed to list *v1.Ingress: the server could not find the requested resource`
   > 
   > if create a ingress with class name `apisix`, it won't be processed
   
   Check out the kubernetes version, ingress v1 was introduced since v1.19.0.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] lxm commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
lxm commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956067152


   
   
   
   > > tried reinstall apisix ingress controller many times.
   > > status of apisixroute is same as #730
   > 
   > Can multiple installs solve this problem?
   
   no
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] sumeng001 commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
sumeng001 commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956063534


   
   
   
   
   > tried reinstall apisix ingress controller many times.
   > 
   > status of apisixroute is same as #730
   
   Can multiple installs solve this problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-957273300


   > and the controller continues output a errror `E1101 18:32:56.227617 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.Ingress: failed to list *v1.Ingress: the server could not find the requested resource`
   > 
   > if create a ingress with class name `apisix`, it won't be processed
   
   Check out the kubernetes version, ingress v1 was introduced since v1.19.0.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-957273300


   > and the controller continues output a errror `E1101 18:32:56.227617 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.Ingress: failed to list *v1.Ingress: the server could not find the requested resource`
   > 
   > if create a ingress with class name `apisix`, it won't be processed
   
   Check out the kubernetes version, ingress v1 was introduced since v1.19.0.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] lxm commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
lxm commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956071526


   restart the apisix-ingress-controller solve the promblem 
   
   maybe something wrong with the init container
   
   by the way, an error was found when ingress-controller started
   ```
   {"Error": "open /etc/webhook/certs/cert.pem: no such file or directory", "CertFilePath": "/etc/webhook/certs/cert.pem", "KeyFilePath": "/etc/webhook/certs/key.pem"}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] lxm commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
lxm commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956057613


   tried reinstall apisix ingress controller many times.
   
   status of apisixroute is same as #730 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 closed issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tao12345666333 closed issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956020541


   What is your installation method?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] lxm commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
lxm commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956037604


   > `prod-qingjiao-api` svc not exist?
   
   install  using helm
   prod-qingjiao-api exist
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] lxm commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
lxm commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956121230


   > The Route version that apisix-ingress-controller watches is `v2beta`, according to the log message:
   > 
   > > 2021-11-01T11:21:34+08:00 error translation/apisix_route.go:184 failed to get service port in backend {"backend": {"serviceName":"","servicePort":0,"weight":null}, "apisix_route": {"metadata":{"name":"qingjiao-apiv2","namespace":"qingjiao-main-prod","selfLink":"/apis/apisix.apache.org/v2beta1/namespaces/qingjiao-main-prod/apisixroutes/qingjiao-apiv2","uid":"7615120a-f0c8-4ad3-b8b5-983eac8aebee","resourceVersion":"2219214738","generation":1,"creationTimestamp":"2021-11-01T03:05:22Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{"apiVersion":"apisix.apache.org/v2beta1","kind":"ApisixRoute","metadata":{"annotations":{},"name":"qingjiao-apiv2","namespace":"qingjiao-main-prod"},"spec":{"http":[{"backend":{"serviceName":"prod-qingjiao-api","servicePort":80},"match":{"hosts":["api.domain.test"],"paths":["/api*"]},"name":"api"}]}}\n"},"managedFields":[{"manager":"kubectl-client-side-apply","operation":"Update","apiVersion":"**apisix.apache.org/v2beta1**","time":"
 2021-11-01T03:05:22Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}},"f:spec":{".":{},"f:http":{}}}}]},"spec":{"http":[{"name":"api","match":{"paths":["/api*"],"hosts":["api.domain.test"]},"backend":{"serviceName":"","servicePort":0,"weight":null},"websocket":false,"authentication":{"enable":false,"type":"","keyauth":{}}}]},"status":{"conditions":[{"type":"ResourcesAvailable","status":"False","lastTransitionTime":"2021-11-01T03:05:23Z","reason":"ResourceSyncAborted","message":"service "" not found"}]}}, "error": "service "" not found"}
   > 
   > You should use the `v2beta2` as the watching version (see [here](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-ingress-controller/templates/configmap.yaml#L36)).
   
   tried to use v2 before restart,but didn't work, got the same error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-962561582


   > 通过插件应该可以 rewrite 到 /api 子路径下,但我也想知道能不能直接在 ingress rule 中,就可以搞定。 类似 ingress nginx 的 nginx.ingress.kubernetes.io/rewrite-target: / 那样。求解答 ~~ 参考:https://apisix.apache.org/docs/apisix/plugins/proxy-rewrite
   
   See http://apisix.apache.org/docs/ingress-controller/concepts/annotations/#rewrite-target.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956021896


   `prod-qingjiao-api` svc not exist?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] lxm commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
lxm commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-956138464


   ![image](https://user-images.githubusercontent.com/1918195/139662383-e4598026-5e7d-4f4d-9bc6-246098acfd42.png)
   configmap shows that apisix-ingress-controller's watch version


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #729: request help: apisixroute not work

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #729:
URL: https://github.com/apache/apisix-ingress-controller/issues/729#issuecomment-1077356255


   Did you try the new version? I can't reproduce your problem.
   
   This issue has not been updated for too long and I will close it.
   If you're still having this problem, please feel free to reopen it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org