snowleopard331 opened a new issue, #2248:
URL: https://github.com/apache/apisix-ingress-controller/issues/2248

   ### Issue description
   
   I want to use APISIX CRD to write upstreams and use the ingress-controller 
to sync the upstreams to APISIX. However, I'm currently encountering an error 
with the following information:
   
   `2024-06-18T10:37:30+08:00   debug  apisix/upstream.go:43   try to 
look up upstream {"name": "default_domainserver.example", "url": 
"http://apisix-admin.default:9180/apisix/admin/upstreams";, "cluster": "default"}
   2024-06-18T10:37:30+08:00    debug  apisix/upstream.go:59   failed 
to find upstream in cache, will try to lookup from APISIX        {"name": 
"default_domainserver.example", "error": "not found"}
   2024-06-18T10:37:30+08:00    debug  apisix/cluster.go:645   get 
resource in cluster {"cluster_name": "default", "name": "upstream", "url": 
"http://apisix-admin.default:9180/apisix/admin/upstreams/b213c5b2"}
   2024-06-18T10:37:30+08:00    warn   apisix/cluster.go:1164  
upstream not found      {"id": "b213c5b2", "url": 
"http://apisix-admin.default:9180/apisix/admin/upstreams/b213c5b2";, "cluster": 
"default"}
   2024-06-18T10:37:30+08:00    error  apisix/apisix_upstream.go:333   
failed to get upstream default_domainserver.example: not found
   2024-06-18T10:37:30+08:00    warn   apisix/apisix_upstream.go:489   
sync ApisixUpstream failed, will retry  {"object": 
{"Type":1,"Object":{"Key":"default/domainserver.example","OldObject":null,"GroupVersion":"apisix.apache.org/v2"},"OldObject":null,"Tombstone":null},
 "error": "not found"}`
   
   Below is the configuration file for the upstream:
   
   `apiVersion: apisix.apache.org/v2
   kind: ApisixUpstream
   metadata:
     name: domainserver.example
   spec:
     retries: 3
     timeout:
       connect: 3s
       send: 3s
       read: 3s
     loadbalancer:
       type: chash
       hashOn: header
       key: x-api-key
     discovery:
       type: nacos
       args:
         groupName: domainServer  # 如果连不上,key可能需要微调
         namespaceId: b46e5b62-32d0-4798-9595-d0bd1382ea0b # 如果连不上,key可能需要微调
       serviceName: "providers:domainServer.example::"
     scheme: grpc
     passHost: pass
   ---
   apiVersion: v1
   kind: Service
   metadata:
     name: domainserver-example
   spec:
     selector:
       app: domainserver.example
     ports:
     - name: http
       port: 80
       targetPort: 8080`
   
   
   How can I solve this problem
   
   ### Environment
   
   - your apisix-ingress-controller version (output of 
apisix-ingress-controller version --long):
   - your Kubernetes cluster version (output of kubectl version):
   - if you run apisix-ingress-controller in Bare-metal environment, also show 
your OS version (uname -a):
   


-- 
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-unsubscr...@apisix.apache.org.apache.org

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

Reply via email to