Sn0rt commented on issue #9698:
URL: https://github.com/apache/apisix/issues/9698#issuecomment-1632167120

   no [email protected]
   
   # retry this in APISIX 2.15
   
   remove the before version
   
   ```
   helm install apisix apisix/apisix --version "0.11.2"
   ```
   
   verify the version
   
   ```
   $ docker exec -it kind-control-plane bash                                    
                                                              [09:09:35]
   root@kind-control-plane:/# crictl exec -it 44e2f6cbd57c5 bash
   bash-5.1# apisix version
   /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua version
   2.15.0
   ```
   
   update `configmap`
   
   ```
   nginx_config:    # config for render the template to genarate nginx.conf
         error_log: test_error.log
         error_log_level: "debug"    # warn,error
   ```
   
   restart the pod
   
   ```
   $ kubectl delete pod apisix-fbc449d4-vggsg                                   
                                                              [09:21:20]
   pod "apisix-fbc449d4-vggsg" deleted
   
   $ kubectl get pod                                                            
                                                              [09:22:10]
   NAME                    READY   STATUS    RESTARTS      AGE
   apisix-etcd-0           1/1     Running   2 (84m ago)   85m
   apisix-etcd-1           1/1     Running   0             85m
   apisix-etcd-2           1/1     Running   2 (84m ago)   85m
   apisix-fbc449d4-bs8tz   1/1     Running   0             44s
   ```
   
   ```bash
   $ export NODE_PORT=$(kubectl get --namespace default -o 
jsonpath="{.spec.ports[0].nodePort}" services apisix-gateway)
     export NODE_IP=$(kubectl get nodes --namespace default -o 
jsonpath="{.items[0].status.addresses[0].address}")
     echo http://$NODE_IP:$NODE_PORT
   http://172.18.0.2:30624
   ```
   
   ```bash
   # check the APISIX containerId
   root@kind-control-plane:/# crictl ps
   CONTAINER           IMAGE               CREATED             STATE            
   NAME                      ATTEMPT             POD ID              POD
   711b3c8195019       7d2986d153861       3 minutes ago       Running          
   apisix                    0                   78ea3ecfb1fc2       
apisix-fbc449d4-bs8tz
   
   # attach to APISIX container
   root@kind-control-plane:/# crictl exec -it 711b3c8195019 bash
   
   # create a router
   bash-5.1# curl http://127.0.0.1:9180/apisix/admin/routes/1  \
   -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/anything",
       "plugins": {},
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "172.18.0.1:80": 1
           }
       }
   }'
   
{"node":{"key":"\/apisix\/routes\/1","value":{"upstream":{"hash_on":"vars","pass_host":"pass","type":"roundrobin","nodes":{"172.18.0.1:80":1},"scheme":"http"},"plugins":{},"create_time":1689133203,"id":"1","status":1,"priority":0,"methods":["GET"],"update_time":1689153936,"uri":"\/anything"}},"action":"set"}
   ```
   
   ```bash
   $ wrk -t30 -c100 -R200 -d30s http://172.18.0.2:30624/anything  
   ```
   
   ```bash
   root@kind-control-plane:/# crictl exec -it 711b3c8195019 bash
   bash-5.1# cat test_error.log |grep semaphore
   ```


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