-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when the service port changes, the ingress cannot detect the change and adjust the upstream port. #12209
Comments
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Once the information in the issue description is helpful to readers here, then you can re-open this issue. I will close it for now as there is no action item here. /remove-kind bug |
@longwuyuan: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/reopen Hello, thanks for your advice, I made changes to the description and format |
@zzzzoy: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
I don't see a description anywhere anywhere that you will change the specs of a backend service to cause a re-synchronization of the ingress resource. I think you should first check the nginx.conf and confirm that the backend is configured in the related server block for the related location. Then you should check the logs of the controller to see if the request you sent matched a rule and it it was routed. If you see both and see a confirmation from both these data points, then that ends the work of the ingress-controller. The ingress-controller uses endpoints to keep track of backends, to which the traffic must be routed. If the backend fails to route because TargetPort changed, I don't think its a problem of the ingress-controller. In any case what you should test is to send request to a local port that is port-forward to the service. Then change the TargetPort. And send request again. Wait for comments from other experts, if I am wrong on this. |
hello. after i fix the service targetPort from 81 to 80,
this is nginx.conf
|
Its not a problem of the ingress-nginx controller |
what I'm puzzled is that the ingress attempts to associate with the pod through the service, but it does not perceive the modify of the service. |
What happened:
At first, I used the wrong targetPort in the service, created the associated ingress but could not be accessed, so I fixed the targetPort of the service. I think the ingress should reload the service to ensure the correct forwarding port. But the fact is that the ingress won't reload and still accesses the wrong targetPort. I had to rebuild the ingress.yaml to make sure it work properly.
I wonder, is this a normal situation? or ingress cannot supported this feature for some reason
To illustrate this problem in a simple example,
service.yaml:
ingress.yaml:
service.yaml:
What you expected to happen:
do not need to rebuild ingress, ingress will reload service change by itself
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
v1.10.1
Kubernetes version (use
kubectl version
):v1.23.15
ingress version:
v1.10.1
OS (e.g. from /etc/os-release): Centos 7.6
Kernel (e.g.
uname -a
):Linux 192-168-0-174 3.10.0-862.14.4.el7.x86_64 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Install tools:
kubeadm
Basic cluster related info:
kubectl version
kubectl get nodes -o wide
192.168.0.121 Ready 3d21h v1.23.15 192.168.0.121 CentOS Linux 7 (Core) 3.10.0-862.14.4.el7.x86_64 docker://18.9.0
192.168.0.174 Ready etcd,master 4d1h v1.23.15 192.168.0.174 CentOS Linux 7 (Core) 3.10.0-862.14.4.el7.x86_64 docker://18.9.0
192.168.0.185 Ready etcd,master 4d1h v1.23.15 192.168.0.185 CentOS Linux 7 (Core) 3.10.0-957.el7.x86_64 docker://18.9.0
192.168.0.57 Ready etcd,master 4d1h v1.23.15 192.168.0.57 CentOS Linux 7 (Core) 3.10.0-957.el7.x86_64 docker://18.9.0
How was the ingress-nginx-controller installed: helm
Current State of the controller: running
The text was updated successfully, but these errors were encountered: