apisix2.10 cannot create routes with ingress-controller1.3.0 #5321
Unanswered
xiongyunhua-star
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
pod err log:
021-10-23T17:07:15+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":"xyhapisix","namespace":"default","selfLink":"/apis/apisix.apache.org/v2beta1/namespaces/default/apisixroutes/xyhapisix","uid":"b2a9e6c2-02ca-4a16-ade8-667df6951ca4","resourceVersion":"16701058","generation":1,"creationTimestamp":"2021-10-23T09:07:14Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{"apiVersion":"apisix.apache.org/v2beta1","kind":"ApisixRoute","metadata":{"annotations":{},"name":"xyhapisix","namespace":"default"},"spec":{"http":[{"backend":{"serviceName":"nginx","servicePort":80},"match":{"hosts":["nginx.xyh.com"],"paths":["/"]},"name":"http"}]}}\n"}},"spec":{"http":[{"name":"http","match":{"paths":["/"],"hosts":["nginx.xyh.com"]},"backend":{"serviceName":"","servicePort":0,"weight":null},"websocket":false,"authentication":{"enable":false,"type":"","keyauth":{}}}]},"status":{}}, "error": "service "" not found"}
2021-10-23T17:07:15+08:00 error ingress/apisix_route.go:170 failed to translate ApisixRoute v2beta1 {"error": "service "" not found", "object": {}}
2021-10-23T17:07:15+08:00 warn ingress/apisix_route.go:292 sync ApisixRoute failed, will retry {"object": {"Type":1,"Object":{"Key":"default/xyhapisix","OldObject":null,"GroupVersion":"apisix.apache.org/v2beta1"},"Tombstone":null}, "error": "service "" not found"}
2021-10-23T17:07:15+08:00 info ingress/controller.go:542 service kube-system/data.external.public-elb-cce not found
2021-10-23T17:07:15+08:00 error ingress/status.go:108 failed to record status change for ApisixRoute {"error": "ApisixRoute.apisix.apache.org "xyhapisix" is invalid: [: Invalid value: "": "spec.http" must validate one and only one schema (oneOf). Found none valid, spec.http.backend: Required value]", "name": "xyhapisi
helm chart:
[root@xyh-az-test-cce-15195-hog4q xyh]# helm ls -n ingress-apisix
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
apisix ingress-apisix 1 2021-10-23 16:43:28.679434665 +0800 CST deployed apisix-0.7.0 2.10.0
apisix-ingress-controller ingress-apisix 1 2021-10-23 16:44:41.054536479 +0800 CST deployed apisix-ingress-controller-0.8.0 1.3.0
my application:
[root@xyh-az-test-cce-15195-hog4q xyh]# kubectl get svc nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx ClusterIP 172.16.114.204 80/TCP 23h
[root@xyh-az-test-cce-15195-hog4q xyh]# kubectl get ep nginx
NAME ENDPOINTS AGE
nginx 10.0.0.90:80,10.0.0.99:80 23h
my apisixroute.yaml
apiVersion: apisix.apache.org/v2beta1
kind: ApisixRoute
metadata:
name: xyhapisix
spec:
http:
match:
hosts:
paths:
backend:
serviceName: nginx
servicePort: 80
my configmap:
apiVersion: v1
data:
config.yaml: |
log options
log_level: "info"log_output: "stderr"
http_listen: ":8080"
enable_profiling: true
kubernetes:
kubeconfig: ""
resync_interval: "6h"
app_namespaces:
ingress_class: "apisix"
ingress_version: "networking/v1"
apisix_route_version: "apisix.apache.org/v2beta1"
apisix:
base_url: http://apisix-admin.ingress-apisix.svc.cluster.local:9180/apisix/admin
admin_key: "edd1c9f034335f136f87ad84b625c8f1"
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0
router:
http: 'radixtree_host_uri' # radixtree_uri: match route by uri(base on radixtree)
ssl:
enable: true
enable_http2: true
listen_port: 9443
ssl_protocols: "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3"
Beta Was this translation helpful? Give feedback.
All reactions