ingress-nginx: tcp-services configMap add one configuration , Other services that are accessed through tcp cannot be accessed properly
kubectl version 1.23.6, nginx-ingress-controller image version v1.3.0
What happened: I added a piece of data to the tcp-services configMap,The ipv6 dual-stack nginx service is enabled,then ran the curl nodeIp:port command to get the normal service return data. However, when I added another piece of data to the configMap of tcp-services(ipv6 dual stack is also enabled for nginx services), I looped through shell.sh to access the previously added services and got an abnormal return,It took about 30 seconds to get the normal service result.
What you expected to happen: When I add configuration data to the configMap of tcp-services, I do not affect access to other services that are also configured through the configMap of tcp-services
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
NGINX Ingress controller Release: v1.3.0 Build: 2b7b74854d90ad9b4b96a5011b9e8b67d20bfb8f Repository: https://github.com/kubernetes/ingress-nginx nginx version: nginx/1.19.10
Kubernetes version (use kubectl version):
Client Version: version.Info{Major:“1”, Minor:“23”, GitVersion:“v1.23.6”, GitCommit:“ad3338546da947756e8a88aa6822e9c11e7eac22”, GitTreeState:“clean”, BuildDate:“2022-04-14T08:49:13Z”, GoVersion:“go1.17.9”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1”, Minor:“23”, GitVersion:“v1.23.6”, GitCommit:“ad3338546da947756e8a88aa6822e9c11e7eac22”, GitTreeState:“clean”, BuildDate:“2022-04-14T08:43:11Z”, GoVersion:“go1.17.9”, Compiler:“gc”, Platform:“linux/amd64”}
Environment: NAME=“CentOS Linux” VERSION=“7 (Core)” ID=“centos” ID_LIKE=“rhel fedora” VERSION_ID=“7” PRETTY_NAME=“CentOS Linux 7 (Core)” ANSI_COLOR=“0;31” CPE_NAME=“cpe:/o:centos:centos:7” HOME_URL=“https://www.centos.org/” BUG_REPORT_URL=“https://bugs.centos.org/”
CENTOS_MANTISBT_PROJECT=“CentOS-7” CENTOS_MANTISBT_PROJECT_VERSION=“7” REDHAT_SUPPORT_PRODUCT=“centos” REDHAT_SUPPORT_PRODUCT_VERSION=“7”
Linux 10.19.38.223 4.19.12-1.el7.elrepo.x86_64 #1 SMP Fri Dec 21 11:06:36 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
- How was the ingress-nginx-controller installed:
- If helm was used then please show output of
helm ls -A | grep -i ingress - If helm was used then please show output of
helm -n <ingresscontrollernamepspace> get values <helmreleasename> - If helm was not used, then copy/paste the complete precise command used to install the controller, along with the flags and options used
- if you have more than one instance of the ingress-nginx-controller installed in the same cluster, please provide details for all the instances
- If helm was used then please show output of
[root@10 sh]# kubectl describe ingressclasses Name: nginx Labels: app.kubernetes.io/component=controller app.kubernetes.io/instance=ingress-nginx app.kubernetes.io/name=ingress-nginx app.kubernetes.io/part-of=ingress-nginx app.kubernetes.io/version=1.3.0 Annotations: <none> Controller: k8s.io/ingress-nginx Events: <none> [root@10 sh]# [root@10 sh]# kubectl get po -n ingress-nginx NAME READY STATUS RESTARTS AGE ingress-nginx-admission-create-629dv 0/1 Completed 0 62d ingress-nginx-admission-patch-4rlht 0/1 Completed 0 62d ingress-nginx-controller-4bfc6 1/1 Running 1 (43d ago) 50d ingress-nginx-controller-cghx9 1/1 Running 1 (43d ago) 43d
shell script content:
#!/bin/bash
for I in {1…50}; do
curl -v http://x.x.x.x:31687
let SUM=$I
echo “$SUM”
sleep 1
done
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 22 (11 by maintainers)
ok ,I’ve formatted the content
I re-used two pod of mysql and the corresponding service with ipv6 enabled for testing. The testing procedure and test results are as follows
step1. i create two deployment and service (with ipv6), the mirror is MySQL , below is the resource object
step2. add two pieces of data to the configMap of tcp-services
step3. use IP of the node where the pod of nginx ingress controller is located,with the configured tcp host port,to access the created service . I was able to log into MySQL successfully and log out safely
step4. I tried to log in and out of mysql multiple times using a shell script, using the host ip and port,And execute
./test-1-6-mysql-demo.sh.the script content and execution result are as followsstep5. I tried to delete another mysql pod created during the execution of the shell script ,and found many errors in the shell script execution results
Viewing the ingress-nginx pod also has a lot of error messages
@longwuyuan @tao12345666333