[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-07 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1031730372


   @tao12345666333 Thanks


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-08 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1032916023


   @tao12345666333 Sorry it is a real bug. Please reopen
   
   After three or four times that I restart the cluster (it is a lab framework: 
start on the morning and shutdown on the night) the route takes a POD address 
again.
   
   The same framework used in my previous reply now shows:
   Route definition, service addresses and pod addresses
   ```
   sysop@m01serv:~/software/apisisx$ cat productpage-ar.yaml 
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: productpage
   spec:
 http:
 - name: rule1
   match:
 hosts:
 - www2.m01.net
 paths:
 - /*
   backends:
   - serviceName: productpage
 servicePort: 9080
 resolveGranularity: service
   
   sysop@m01serv:~/software/apisisx$ kubectl get svc -n bookinfo
   NAME  TYPECLUSTER-IP  EXTERNAL-IP   PORT(S)AGE
   details   ClusterIP   10.43.230.138   9080/TCP   13d
   ratings   ClusterIP   10.43.16.57 9080/TCP   13d
   reviews   ClusterIP   10.43.236.529080/TCP   13d
   productpage   ClusterIP   10.43.189.220   9080/TCP   13d
   sysop@m01serv:~/software/apisisx$ 
   sysop@m01serv:~/software/apisisx$ kubectl get pods -n bookinfo -o wide
   NAME  READY   STATUSRESTARTS  AGE   IP   
 NODE NOMINATED NODE   READINESS GATES
   reviews-v3-5cddf46b56-x2hbz   2/2 Running   10 (9h ago)   9d
10.42.2.210   m01kw2  
   details-v1-65fff9896-fw7qv2/2 Running   10 (9h ago)   9d
10.42.1.244   m01kw1  
   reviews-v1-d7f5b879b-bf7tz2/2 Running   10 (9h ago)   9d
10.42.1.4 m01kw1  
   productpage-v1-77748558b4-w2h2h   2/2 Running   10 (9h ago)   9d
10.42.1.2 m01kw1  
   ratings-v1-5db74dc944-5z2rz   2/2 Running   10 (9h ago)   9d
10.42.0.17m01km   
   reviews-v2-6fcf6d48b4-bvtzn   2/2 Running   10 (9h ago)   9d
10.42.0.23m01km   
   sysop@m01serv:~/software/apisisx$ 
   
   ```
   The route definition taken from the apisix dashboard:
   ```
   nodes:
 - host: 10.42.1.232
   port: 9080
   weight: 100
   type: roundrobin
   hash_on: vars
   scheme: http
   pass_host: pass
   name: bookinfo_productpage_9080
   desc: Created by apisix-ingress-controller, DO NOT modify it manually
   labels:
 managed-by: apisix-ingress-controller
   
   ```
   Clearly the route don't work
   I cannot figure out why the address changes.
   
   BTW another route defined using the apisix dashboard continues to work 
regularly
   
   
   
   
   


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-09 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1034071790


   Hi @tao12345666333 I don't know if it is related, but if you delete an 
apisixroute, it results deleted for kubernetes but is still alive in 
apisix-dashboard.
   
   First I deleted the route and waited for one hour and half
   https://user-images.githubusercontent.com/11090934/153266401-18853ea6-a881-4e21-ae1f-418b29520891.png";>
   
   Then I looked at upstream list in apisix-dashboard and the upstream (and 
route) is still there
   https://user-images.githubusercontent.com/11090934/153266547-1cc5d03d-31fe-4626-a00b-5d6f11bee80d.png";>
   
   Seems that kubernetes and apisix will never be synced.
   



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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-10 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1035952958


   Hi, @liangyuanpeng this issue started as a bug report. You can follow the 
section "Step to reproduce"
   


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-10 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1035954493


   Hi @tao12345666333 I didn't see anything in the controller log.
   In this moment I'm reistalling from scratch.
   asap I can test I'll post the complete controller log
   


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-12 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1037286073


   Hi @apit my use case is:
   
   - a portable (must run on a notebook) kubernetes cluster that should work 
also in airgapped site
   - security, authentication, networking and telemetry outside the 
microservices I'll develop
   - a virtual machine for services (DNS, Keycloak, etc...) and a 3 node 
cluster on virtual machines running K3S
   
   In this scenatio I access sevices using the /etc/host file for external 
machines and DNS in the services virtual machine for itself and the 3 node 
cluster
   
   Every day I start the cluster and the supporting VM and every night shutdown 
the cluster and the supporting virtual machines
   
   Using NodePort the gateway not always start on the same node and in this 
case I have to change the /etc/host file and the DNS tables
   
   Using LoadBalancer the address used is always valid
   

   
   


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-12 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1037329951


   I've completed the reinstallation, but after 4 cluster restart the Service 
address is substituted by a Pod address
   The route just defined
   
![route_defined](https://user-images.githubusercontent.com/11090934/153720675-4ab228b1-a853-469a-8827-8d7beb47c53b.jpg)
   The route the day after 
   https://user-images.githubusercontent.com/11090934/153720696-e30add07-5ade-4644-be2e-14c505da6a97.png";>
   
   I installed using the new chart
   ```
   sysop@m01serv:~/software/apisisx$ helm show chart apisix/apisix
   apiVersion: v2
   appVersion: 2.12.0
   dependencies:
   - condition: etcd.enabled
 name: etcd
 repository: https://charts.bitnami.com/bitnami
 version: 6.2.6
   - alias: dashboard
 condition: dashboard.enabled
 name: apisix-dashboard
 repository: https://charts.apiseven.com
 version: 0.4.0
   - alias: ingress-controller
 condition: ingress-controller.enabled
 name: apisix-ingress-controller
 repository: https://charts.apiseven.com
 version: 0.9.0
   description: A Helm chart for Apache APISIX
   icon: https://apache.org/logos/res/apisix/apisix.png
   maintainers:
   - name: tao12345666333
   name: apisix
   type: application
   version: 0.8.2
   ```
   On this chart I changed
   ```
   ...
   gateway:
 type: LoadBalancer
   ...
 tls:
   enabled: true
   ...
   dashboard:
 enabled: true
   
   ingress-controller:
 enabled: true
   ```
   The stream modification from issue #851 is no more applicable. The below 
code gives a syntax error (expected integer received string)
   ```
   ...
 stream:  # L4 proxy (TCP/UDP) see bug #851 
   enabled: true
   only: false
   tcp: # TCP proxy address list
 - 9100
 - "127.0.0.1:9101"
   udp: # UDP proxy address list
 - 9200
 - "127.0.0.1:9211"
   ```
   Apisix installed with
   ```
   kubectl create ns apisix
   kubectl label namespace apisix istio-injection=enabled
   helm install apisix apisix/apisix -f apisix-values.yaml \
   --set ingress-controller.config.apisix.serviceNamespace=apisix \
   --set ingress-controller.config.apisix.serviceName=apisix-admin \
   --namespace apisix
   ```
   Defining the route as
   ```
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: productpage
   spec:
 http:
 - name: rule1
   match:
 hosts:
 - www2.m01.net
 paths:
 - /*
   backends:
   - serviceName: productpage
 servicePort: 9080
 resolveGranularity: service
   ```
   
   The only strange thing in the apisix-ingress-controller log is that verdion 
**v2beta1** is deprecated in favor of **v2beta3** 
   But in the yaml file there is **v2beta2**
   ```
   [GIN] 2022/02/12 - 03:25:30 | 200 | 31.569µs | 127.0.0.6 | GET "/healthz"
   [GIN] 2022/02/12 - 03:25:30 | 200 | 20.218µs | 127.0.0.6 | GET "/healthz"
   W0212 03:25:35.736793 1 warnings.go:70] apisix.apache.org/v2beta1 
ApisixRoute is deprecated; use apisix.apache.org/v2beta3 ApisixRoute
   [GIN] 2022/02/12 - 03:25:40 | 200 | 43.57µs | 127.0.0.6 | GET "/healthz"
   [GIN] 2022/02/12 - 03:25:40 | 200 | 18.58µs | 127.0.0.6 | GET "/healthz"
   ```
   
   The apisix-ingress controller at startup (today)
   ```
   2022-02-12T16:49:19.277Z | I0213 00:49:19.277167 1 request.go:665] Waited 
for 1.163982311s due to client-side throttling, not priority and fairness, 
request: 
GET:https://10.43.0.1:443/apis/apisix.apache.org/v2beta3/namespaces/longhorn-system/apisixconsumers
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/controller.go:549 controller now is running as leader {"namespace": 
"apisix", "pod": "apisix-ingress-controller-6846db58b8-lsv6g"}
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/apisix_pluginconfig.go:57 ApisixPluginConfig controller started
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/endpoint.go:56 endpoints controller started
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/ingress.go:59 ingress controller started
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/apisix_tls.go:58 ApisixTls controller started
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/apisix_cluster_config.go:57 ApisixClusterConfig controller started
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/secret.go:62 secret controller started
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/apisix_upstream.go:58 ApisixUpstream controller started
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/apisix_consumer.go:56 ApisixConsumer controller started
   2022-02-12T16:49:20.101Z | 2022-02-13T00:49:20+08:00 info 
ingress/ap

[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-12 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1037340275


   Hi @liangyuanpeng with this chart it seems to work
   The delete route command (timestam in Rome time thea are UTC+1 - So in 
apisix log look for 17 instead of 18)
   ```
   sysop@m01serv:~/software/apisisx$ kubectl get apisixroute -n bookinfo
   NAME  HOSTS  URIS AGE
   productpage   ["www2.m01.net"]   ["/*"]   22h
   sysop@m01serv:~/software/apisisx$ kubectl delete apisixroute productpage -n 
bookinfo
   apisixroute.apisix.apache.org "productpage" deleted
   sysop@m01serv:~/software/apisisx$ date
   sab 12 feb 2022, 18:31:10, CET
   sysop@m01serv:~/software/apisisx$ 
   ```
The apisix ingress controller log (nothing appear here)
   ```
   2022-02-12T17:30:36.560Z | [GIN] 2022/02/13 - 01:30:36 | 200 | 31.21µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:30:41.352Z | [GIN] 2022/02/13 - 01:30:41 | 200 | 43.929µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:30:46.559Z | [GIN] 2022/02/13 - 01:30:46 | 200 | 40.559µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:30:51.352Z | [GIN] 2022/02/13 - 01:30:51 | 200 | 35.86µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:30:56.558Z | [GIN] 2022/02/13 - 01:30:56 | 200 | 34.359µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:01.352Z | [GIN] 2022/02/13 - 01:31:01 | 200 | 29.04µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:06.560Z | [GIN] 2022/02/13 - 01:31:06 | 200 | 40.28µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:11.352Z | [GIN] 2022/02/13 - 01:31:11 | 200 | 37.56µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:16.559Z | [GIN] 2022/02/13 - 01:31:16 | 200 | 36.14µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:21.352Z | [GIN] 2022/02/13 - 01:31:21 | 200 | 29.45µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:26.559Z | [GIN] 2022/02/13 - 01:31:26 | 200 | 30.51µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:31.353Z | [GIN] 2022/02/13 - 01:31:31 | 200 | 33.74µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:36.559Z | [GIN] 2022/02/13 - 01:31:36 | 200 | 29.13µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:41.352Z | [GIN] 2022/02/13 - 01:31:41 | 200 | 40.02µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:46.559Z | [GIN] 2022/02/13 - 01:31:46 | 200 | 30.469µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:51.352Z | [GIN] 2022/02/13 - 01:31:51 | 200 | 45.11µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:31:56.559Z | [GIN] 2022/02/13 - 01:31:56 | 200 | 30.39µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:32:01.353Z | [GIN] 2022/02/13 - 01:32:01 | 200 | 36.09µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:32:06.559Z | [GIN] 2022/02/13 - 01:32:06 | 200 | 33.08µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:32:11.352Z | [GIN] 2022/02/13 - 01:32:11 | 200 | 28.96µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:32:16.559Z | [GIN] 2022/02/13 - 01:32:16 | 200 | 33.39µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:32:21.115Z | W0213 01:32:21.115801 1 warnings.go:70] 
apisix.apache.org/v2beta1 ApisixRoute is deprecated; use 
apisix.apache.org/v2beta3 ApisixRoute
   2022-02-12T17:32:21.352Z | [GIN] 2022/02/13 - 01:32:21 | 200 | 29.149µs | 
127.0.0.6 | GET "/healthz"
   ```
   In the apisix dasboard the route and upstream disappeared as expected
   
![route_deleted](https://user-images.githubusercontent.com/11090934/153722005-010eabe5-7f64-45c6-88ae-a2d837e2d4fd.jpg)
   
   


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-12 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1037349675


   Recreated the route using v2beta3
   ```
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
 name: productpage
   spec:
 http:
 - name: rule1
   match:
 hosts:
 - www2.m01.net
 paths:
 - /*
   backends:
   - serviceName: productpage
 servicePort: 9080
 resolveGranularity: service
   ```
   Installed with
   ```
   sysop@m01serv:~/software/apisisx$ kubectl -n bookinfo apply -f 
productpage-ar.yaml
   apisixroute.apisix.apache.org/productpage created
   sysop@m01serv:~/software/apisisx$ date
   sab 12 feb 2022, 18:43:37, CET
   sysop@m01serv:~/software/apisisx$ 
   ```
   The warning in the log still complains the **v2beta1** version
   ```
   2022-02-12T17:42:36.559Z | [GIN] 2022/02/13 - 01:42:36 | 200 | 36.86µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:42:41.352Z | [GIN] 2022/02/13 - 01:42:41 | 200 | 41.27µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:42:46.558Z | [GIN] 2022/02/13 - 01:42:46 | 200 | 33.53µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:42:47.785Z | W0213 01:42:47.785053 1 warnings.go:70] 
apisix.apache.org/v2beta1 ApisixRoute is deprecated; use 
apisix.apache.org/v2beta3 ApisixRoute
   2022-02-12T17:42:51.352Z | [GIN] 2022/02/13 - 01:42:51 | 200 | 29.54µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:42:56.559Z | [GIN] 2022/02/13 - 01:42:56 | 200 | 34.069µs | 
127.0.0.6 | GET "/healthz"ù
   
   ...
   
   2022-02-12T17:48:36.559Z | [GIN] 2022/02/13 - 01:48:36 | 200 | 38.13µs | 
127.0.0.6 | GET "/healthz"
   2022-02-12T17:48:41.118Z | W0213 01:48:41.118713 1 warnings.go:70] 
apisix.apache.org/v2beta1 ApisixRoute is deprecated; use 
apisix.apache.org/v2beta3 ApisixRoute
   2022-02-12T17:48:41.352Z | [GIN] 2022/02/13 - 01:48:41 | 200 | 24.85µs | 
127.0.0.6 | GET "/healthz"
   ```
   The route correctly point to the Service address
   https://user-images.githubusercontent.com/11090934/153722325-229bdfbc-a572-4932-acc8-8f16d3b95ad9.png";>
   
   Now I'll try some cluster restarts to se if the address changes
   
   
   


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-13 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1037286073






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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-15 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1040189346


   > > The warning in the log still complains the v2beta1 version
   > 
   > @MirtoBusico This is a configuration item, in configmap. It can be changed 
at values.yaml 
https://github.com/apache/apisix-helm-chart/blob/051998d8cc1816674fcbc3c8029f9e7d1330e3d5/charts/apisix-ingress-controller/values.yaml#L113-L115
   
   Thens @tao12345666333 
   Now I'll reinstall with (if I understand correctly)
   ```
   helm install apisix apisix/apisix -f apisix-values.yaml \
   --set ingress-controller.config.apisix.serviceNamespace=apisix \
   --set ingress-controller.config.apisix.serviceName=apisix-admin \
   --set 
ingress-controller.config.kubernetes.apisixRouteVersion=apisix.apache.org/v2beta3
 \
   --namespace apisix
   ```
   
   
   


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-15 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1040277232


   Hi @tao12345666333 I've reinstalled apisix with these changes in values.yaml:
   ```
   ...
   gateway:
 type: LoadBalancer
   ...
 tls:
   enabled: true
   servicePort: 443
   containerPort: 9443
   existingCASecret: "m01cacert"
   certCAFilename: "cert"
   http2:
 enabled: true
   ...
   discovery:
 enabled: true
 registry:
   dns:
   servers:
   - "10.43.0.10:53"
   ...
   dashboard:
 enabled: true
   
   
   ingress-controller:
 enabled: true
   ```
   And installed with:
   ```
   kubectl create ns apisix
   kubectl label namespace apisix istio-injection=enabled
   helm install apisix apisix/apisix -f apisix-values.yaml \
   --set ingress-controller.config.apisix.serviceNamespace=apisix \
   --set ingress-controller.config.apisix.serviceName=apisix-admin \
   --set 
ingress-controller.config.kubernetes.apisixRouteVersion=apisix.apache.org/v2beta3
 \
   --namespace apisix
   ```
   Created a route with:
   ```
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
 name: productpage
   spec:
 http:
 - name: rule1
   match:
 hosts:
 - www2.m01.net
 paths:
 - /*
   backends:
   - serviceName: productpage
 servicePort: 9080
 resolveGranularity: service
   ```
   Using the command:
   ```
   kubectl -n bookinfo apply -f productpage-ar.yaml
   ```
   
   The route is created with the service address
   Nothing appears about route creation in apisix-ingres-controller log:
   ```
   2022-02-15T13:20:13.772Z | [GIN] 2022/02/15 - 21:20:13 | 200 | 31.747µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T13:20:13.773Z | [GIN] 2022/02/15 - 21:20:13 | 200 | 33.197µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T13:20:23.772Z | [GIN] 2022/02/15 - 21:20:23 | 200 | 40.887µs | 
127.0.0.6 | GET "/healthz"
   ```
   The command executed op apisix pod (using the upstream_id from apisix 
dashboard) says
   ```
   bash-5.1# curl http://127.0.0.1:9180/apisix/admin/upstreams/49b914ed -H 
'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X GET
   
{"action":"get","count":1,"node":{"key":"\/apisix\/upstreams\/49b914ed","value":{"labels":{"managed-by":"apisix-ingress-controller"},"scheme":"http","name":"bookinfo_productpage_9080","update_time":1644930766,"hash_on":"vars","desc":"Created
 by apisix-ingress-controller, DO NOT modify it 
manually","type":"roundrobin","nodes":[{"weight":100,"port":9080,"priority":0,"host":"10.43.189.220"}],"id":"49b914ed","pass_host":"pass","create_time":1644930766}}}
   bash-5.1# 
   ```
   
   
   
   
   
   
   
   
   
   


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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-15 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1040189346






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

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




[GitHub] [apisix-ingress-controller] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-15 Thread GitBox


MirtoBusico commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1040676363


   Well @tao12345666333 seems that no error appears in the logs after deleting 
the route.
   
   Command to delete the route:
   ```
   sysop@m01serv:~/software/test$ kubectl get apisixroute --all-namespaces
   NAMESPACE   NAME  HOSTS  URIS AGE
   bookinfoproductpage   ["www2.m01.net"]   ["/*"]   5h19m
   sysop@m01serv:~/software/test$ date
   mar 15 feb 2022, 19:34:21, CET
   sysop@m01serv:~/software/test$ kubectl delete apisixroute productpage -n 
bookinfo
   apisixroute.apisix.apache.org "productpage" deleted
   sysop@m01serv:~/software/test$ 
   ```
   Nothing appears in the ingress-controller log
   ```
   2022-02-15T18:33:53.772Z | [GIN] 2022/02/16 - 02:33:53 | 200 | 17.1µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:03.772Z | [GIN] 2022/02/16 - 02:34:03 | 200 | 27.47µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:03.772Z | [GIN] 2022/02/16 - 02:34:03 | 200 | 28.34µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:13.773Z | [GIN] 2022/02/16 - 02:34:13 | 200 | 37.58µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:13.773Z | [GIN] 2022/02/16 - 02:34:13 | 200 | 20.22µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:23.772Z | [GIN] 2022/02/16 - 02:34:23 | 200 | 30.71µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:23.772Z | [GIN] 2022/02/16 - 02:34:23 | 200 | 29.34µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:33.772Z | [GIN] 2022/02/16 - 02:34:33 | 200 | 27.51µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:33.772Z | [GIN] 2022/02/16 - 02:34:33 | 200 | 12.57µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:43.772Z | [GIN] 2022/02/16 - 02:34:43 | 200 | 30.91µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:43.773Z | [GIN] 2022/02/16 - 02:34:43 | 200 | 31.64µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:53.772Z | [GIN] 2022/02/16 - 02:34:53 | 200 | 30.88µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:34:53.772Z | [GIN] 2022/02/16 - 02:34:53 | 200 | 43.06µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:35:03.772Z | [GIN] 2022/02/16 - 02:35:03 | 200 | 33.889µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:35:03.772Z | [GIN] 2022/02/16 - 02:35:03 | 200 | 101.16µs | 
127.0.0.6 | GET "/healthz"
   2022-02-15T18:35:13.772Z | [GIN] 2022/02/16 - 02:35:13 | 200 | 34.17µs | 
127.0.0.6 | GET "/healthz"
   ```
   In the apisix log appears the deletion
   ```
   2022-02-15T18:35:36.230Z | 127.0.0.6 - - [15/Feb/2022:18:35:33 +] 
apisix-admin.apisix.svc.cluster.local:9180 "DELETE 
/apisix/admin/routes/72be264c HTTP/1.1" 200 90 0.009 "-" "Go-http-client/1.1" - 
- - "http://apisix-admin.apisix.svc.cluster.local:9180";
   2022-02-15T18:35:36.230Z | 127.0.0.6 - - [15/Feb/2022:18:35:33 +] 
apisix-admin.apisix.svc.cluster.local:9180 "DELETE 
/apisix/admin/upstreams/49b914ed HTTP/1.1" 200 93 0.008 "-" 
"Go-http-client/1.1" - - - "http://apisix-admin.apisix.svc.cluster.local:9180";
   ```
   Then I stopped and started the cluster and I don't see anything wrong in the 
startup logs:
   
   Apisix ingress controller log:
   ```
   2022-02-15T18:54:44.164Z | 2022-02-16T02:54:44+08:00 warn 
ingress/controller.go:653 upstream is not referenced {"cluster": "name=default; 
base_url=http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin";, 
"upstream": "kubernetes-dashboard_dashboard-metrics-scraper_8000"}
   2022-02-15T18:54:44.166Z | 2022-02-16T02:54:44+08:00 warn 
apisix/upstream.go:70 upstream not found {"name": 
"istio-operator_istio-operator_8383", "url": 
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/6b312a6d";,
 "cluster": "default"}
   2022-02-15T18:54:44.166Z | 2022-02-16T02:54:44+08:00 warn 
ingress/controller.go:653 upstream is not referenced {"cluster": "name=default; 
base_url=http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin";, 
"upstream": "istio-operator_istio-operator_8383"}
   2022-02-15T18:54:44.170Z | 2022-02-16T02:54:44+08:00 warn 
apisix/upstream.go:70 upstream not found {"name": "bookinfo_ratings_9080", 
"url": 
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/4a5806af";,
 "cluster": "default"}
   2022-02-15T18:54:44.170Z | 2022-02-16T02:54:44+08:00 warn 
ingress/controller.go:653 upstream is not referenced {"cluster": "name=default; 
base_url=http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin";, 
"upstream": "bookinfo_ratings_9080"}
   2022-02-15T18:54:44.176Z | 2022-02-16T02:54:44+08:00 warn 
apisix/upstream.go:70 upstream not found {"name": "apisix_apisix-dashboard_80", 
"url": 
"http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/upstreams/6624cd4a";,
 "cluster": "default"}
   2022-02-15T18:54:44.176Z | 2022-02-16T02:54:44+08:00 warn 
ingress/controller.go:653 upstream is not referenced {"cluster": "name=default; 
base_url=http://apisi