pioneer-hash opened a new issue #276:
URL: https://github.com/apache/apisix-ingress-controller/issues/276


   ### Issue description
   When there is a problem with upstream resource configuration, delete the 
service corresponding to upstream POD and re-expose it.A look at the 
Apisix-Ingress log shows that it also monitors old services。
   This is deploymen yaml of  pod :
   `kind: Deployment
   metadata:
     creationTimestamp: null
     labels:
       app: web
     name: web
   spec:
     replicas: 1
     selector:
       matchLabels:
         app: web
     strategy: {}
     template:
       metadata:
         creationTimestamp: null
         labels:
           app: web
       spec:
         containers:
         - image: nginx
           name: nginx
           resources: {}
   status: {}
   ~
   `
   This is  service yaml  of pod :
   `apiVersion: v1
   kind: Service
   metadata:
     creationTimestamp: "2021-03-02T02:48:52Z"
     labels:
       app: web
     name: web
     namespace: default --- there is  problematic  because my apisix-ingress is 
gray-publish of namespace  , this servicde  can't be found
     resourceVersion: "13882151"
     selfLink: /api/v1/namespaces/default/services/web
     uid: 0d434999-12bb-4dfa-9c93-e69d66290944
   spec:
     clusterIP: 10.102.85.217
     externalTrafficPolicy: Cluster
     ports:
     - nodePort: 32712
       port: 80
       protocol: TCP
       targetPort: 80
     selector:
       app: web
     sessionAffinity: None
     type: NodePort
   status:
     loadBalancer: {}
   `
   This is my apisix-upstream.yaml:
   `apiVersion: apisix.apache.org/v1
   kind: ApisixUpstream
   metadata:
     name: web
   spec:
     ports:
     - port: 80
       loadbalancer:
         type: chash
         hashOn: cookie
         key: sid1
   `
   when I  use  kubectl  apply -f   apisix-upstream.yaml to  create  upstream 
CRD , Appear error : 
   E0302 10:59:37.243624       1 apisix_upstream.go:113] error syncing 
'default/web': list upstreams failed, err: Get 
http://apisix-admin:9180/apisix/admin/upstreams: dial tcp: lookup apisix-admin 
on 10.96.0.10:53: server misbehaving。 
   So  I  use commamd  kubectl  delete -f   apisix-upstream.yaml  and modifi  
apisix-upstream.yaml  then change the namespace to gray-publish.  But   the 
error log is the same as last time :
   E0302 11:11:37.340643       1 apisix_upstream.go:113] error syncing 
'default/web': list upstreams failed, err: Get 
http://apisix-admin:9180/apisix/admin/upstreams: dial tcp: lookup apisix-admin 
on 10.96.0.10:53: server misbehaving。
   
   
   
   ### 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`).
   
   ### Minimal test code / Steps to reproduce the issue
   
   1.
   2.
   3.
   
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   
   ### What's the expected result?
   


----------------------------------------------------------------
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.

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


Reply via email to