silence8013 commented on issue #2699:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/2699#issuecomment-3776659129

   Hi friend, I've encountered the same problem. After upgrading from version 
2.0.0-rc4 to 2.0.1, I also got a 502 error. After analysis, I found that the 
APISIX service configuration before and after the upgrade had changed. The 
previous version directly used "upstream", while the upgraded version 
references "upstream_id".
   
   In the new ADC, I found that pod recreate only triggers updates to the 
upstream that references the "upstream_id". See below:
   
   beforce:
   
   ```
   {
       "value": {
           "upstream": {
               "scheme": "http",
               "type": "roundrobin",
               "labels": {
                   "managed-by": "apisix-ingress-controller"
               },
               "nodes": [
                   {
                       "weight": 1,
                       "port": 8099,
                       "host": "10.138.131.252"
                   }
               ]
           },
           "id": "3f62e9ff",
           "hosts": [
               "fat-resource-manager.hellobike.cn"
           ],
           "labels": {
               "k8s/namespace": "ai-infra",
               "k8s/controller-name": 
"apisix.apache.org/apisix-ingress-controller",
               "k8s/kind": "Ingress",
               "manager-by": "apisix-ingress-controller",
               "k8s/name": "resource-manager-ingress"
           },
           "create_time": 1762327351,
           "update_time": 1768901974,
           "name": "ai-infra_resource-manager-ingress_0-0"
       },
       "key": "/apisix/services/3f62e9ff",
       "createdIndex": 5750,
       "modifiedIndex": 1066742
   }
   ```
   
   after:
   ```
   {
       "value": {
           "upstream_id": "3f62e9ff"
           "id": "3f62e9ff",
           "hosts": [
               "fat-resource-manager.hellobike.cn"
           ],
           "labels": {
               "k8s/namespace": "ai-infra",
               "k8s/controller-name": 
"apisix.apache.org/apisix-ingress-controller",
               "k8s/kind": "Ingress",
               "manager-by": "apisix-ingress-controller",
               "k8s/name": "resource-manager-ingress"
           },
           "create_time": 1762327351,
           "update_time": 1768901974,
           "name": "ai-infra_resource-manager-ingress_0-0"
       },
       "key": "/apisix/services/3f62e9ff",
       "createdIndex": 5750,
       "modifiedIndex": 1066742
   }
   
   ```
   
   Therefore, a 502 status code appears.
   
   To restore, you need to recreate the ingress 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to