-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Closed
Copy link
Labels
kind/supportCategorizes issue or PR as a support question.Categorizes issue or PR as a support question.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.triage/needs-informationIndicates an issue needs more information in order to work on it.Indicates an issue needs more information in order to work on it.
Description
What happened:
After Modified service targetPort, the targetPort not sync to cooresponing backend
kubectl get svc nginx-svc
apiVersion: v1
kind: Service
metadata:
annotations:
aa: aaa
creationTimestamp: "2024-08-22T03:44:11Z"
labels:
aa: ccc
name: nginx-svc
namespace: default
resourceVersion: "1998073"
uid: a936ed5d-6b33-4175-9ae3-405c53131c8f
spec:
clusterIP: 172.30.86.90
clusterIPs:
- 172.30.86.90
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8336
selector:
app: nginx
sessionAffinity: None
type: ClusterIPbut the cooresponing backends port not be synced.
kubectl exec deployment/nginx-ingress-controller -n kube-system -- /dbg backends get default-nginx-svc-8080
Defaulted container "nginx-ingress-controller" out of: nginx-ingress-controller, init-sysctl (init)
{
"endpoints": [
{
"address": "10.0.0.139",
"port": "8335"
}
],
"name": "default-nginx-svc-8080",
"noServer": false,
"port": 8080,
"service": {
"metadata": {
"creationTimestamp": null
},
"spec": {
"clusterIP": "172.30.86.90",
"clusterIPs": [
"172.30.86.90"
],
"internalTrafficPolicy": "Cluster",
"ipFamilies": [
"IPv4"
],
"ipFamilyPolicy": "SingleStack",
"ports": [
{
"name": "http",
"port": 8080,
"protocol": "TCP",
"targetPort": 8335
}
],
"selector": {
"app": "nginx"
},
"sessionAffinity": "None",
"type": "ClusterIP"
},
"status": {
"loadBalancer": {}
}
},
"sessionAffinityConfig": {
"cookieSessionAffinity": {
"name": ""
},
"mode": "",
"name": ""
},
"sslPassthrough": false,
"trafficShapingPolicy": {
"cookie": "",
"header": "",
"headerPattern": "",
"headerValue": "",
"weight": 0,
"weightTotal": 0
},
"upstreamHashByConfig": {
"upstream-hash-by-subset-size": 3
}
}What you expected to happen:
the coorespoing backend port is synced to 8336
From the log information, we can see the detailed processing of the service update event, and ultimately, the backend update is ignored.
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
v1.10.4
Kubernetes version (use kubectl version):
v1.22.15
Environment:
- Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a): - Install tools:
Please mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.
- Basic cluster related info:
kubectl version
v1.22.15kubectl get nodes -o wide
Anything else we need to know:
Metadata
Metadata
Assignees
Labels
kind/supportCategorizes issue or PR as a support question.Categorizes issue or PR as a support question.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.triage/needs-informationIndicates an issue needs more information in order to work on it.Indicates an issue needs more information in order to work on it.
Type
Projects
Status
Done
