JoniJnm commented on issue #1948: URL: https://github.com/apache/apisix-ingress-controller/issues/1948#issuecomment-1702500166
A way to reproduce the problem: ```sh # install apisix helm repo add apisix https://charts.apiseven.com helm repo update apisix helm upgrade \ --install \ --wait \ -n testing \ --create-namespace \ --version 1.5.1 \ --set "etcd.replicaCount=1" \ --set "apisix.enableIPv6=false" \ --set "ingress-controller.enabled=true" \ --set "ingress-controller.config.apisix.serviceNamespace=testing" \ apisix apisix/apisix # install an example application helm repo add qonstrukt https://qonstrukt.github.io/helm-charts/ helm repo update helm upgrade --install --wait -n testing apache-php qonstrukt/php # add ApisixRoute cat <<EOF | kubectl apply -n testing -f - apiVersion: apisix.apache.org/v2 kind: ApisixRoute metadata: name: my-apisix spec: http: - name: my-api match: hosts: - my.host paths: - /* backends: - serviceName: apache-php servicePort: 80 EOF # append service-ip to /etc/hosts echo "$(kubectl get services -n testing apisix-gateway -o jsonpath="{.spec.clusterIP}") my.host" | sudo tee -a /etc/hosts # show request headers kubectl exec "$(kubectl get pods -n testing -o name -l "app.kubernetes.io/name=php")" -n testing -- \ sh -c 'echo "<?php print_r(\$_SERVER);" > /var/www/html/index.php' # call service curl -s my.host | grep HTTP_X_FORWARDED_PORT # output: [HTTP_X_FORWARDED_PORT] => 9080 ``` -- 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]
