You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have deployed two Nginx ingress controller in our cluster. The first ingress controller works fine but we are facing issue with second one. When accessing the service through second ingress controller (http://x3.abc.com/sample), we get This site can’t be reached x3.abc.com took too long to respond. error. We followed the same step as the first ingress controller including assigning different IP address using metallb and different ingress class in different namespace.
What you expected to happen:
For testing purpose we deployed a simple nginx image using standard yaml files. Everything is up and running, No error logs in pods, service mapped correct endpoints and ingress resource got external IP assigned by Second nginx ingress controller But when we try to access http://x3.abc.com/sample gives Site can't be reached error.
Client Version: v1.30.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.11+rke2r1 Environment:
Cloud provider or hardware configuration: Metallb
OS: Red Hat Enterprise Linux
Kernel (e.g. uname -a): Linux
RKE2 Version: v1.28.11
Metallb Version: v0.14.5
How was the ingress-nginx-controller installed:
-Below is the second nginx ingress controller passed values
helm -n abcx3apps get values rke2-ingress-nginx-abcx3
Name: rke2-ingress-nginx-controllerSelector: app.kubernetes.io/component=controller,app.kubernetes.io/instance=rke2-ingress-nginx,app.kubernetes.io/name=rke2-ingress-nginxNode-Selector: kubernetes.io/os=linuxLabels: app.kubernetes.io/component=controllerapp.kubernetes.io/instance=rke2-ingress-nginxapp.kubernetes.io/managed-by=Helmapp.kubernetes.io/name=rke2-ingress-nginxapp.kubernetes.io/part-of=rke2-ingress-nginxapp.kubernetes.io/version=1.10.1helm.sh/chart=rke2-ingress-nginx-4.10.101Annotations: deprecated.daemonset.template.generation: 1meta.helm.sh/release-name: rke2-ingress-nginxmeta.helm.sh/release-namespace: kube-systemDesired Number of Nodes Scheduled: 10Current Number of Nodes Scheduled: 10Number of Nodes Scheduled with Up-to-date Pods: 10Number of Nodes Scheduled with Available Pods: 10Number of Nodes Misscheduled: 0Pods Status: 10 Running / 0 Waiting / 0 Succeeded / 0 FailedPod Template:
Labels: app.kubernetes.io/component=controllerapp.kubernetes.io/instance=rke2-ingress-nginxapp.kubernetes.io/managed-by=Helmapp.kubernetes.io/name=rke2-ingress-nginxapp.kubernetes.io/part-of=rke2-ingress-nginxapp.kubernetes.io/version=1.10.1helm.sh/chart=rke2-ingress-nginx-4.10.101Service Account: rke2-ingress-nginxContainers:
rke2-ingress-nginx-controller:
Image: rancher/nginx-ingress-controller:v1.10.1-hardened1Ports: 80/TCP, 443/TCP, 8443/TCPHost Ports: 80/TCP, 443/TCP, 0/TCPSeccompProfile: RuntimeDefaultArgs:
/nginx-ingress-controller--publish-service=$(POD_NAMESPACE)/rke2-ingress-nginx-controller--election-id=rke2-ingress-nginx-leader--controller-class=k8s.io/ingress-nginx--ingress-class=nginx--configmap=$(POD_NAMESPACE)/rke2-ingress-nginx-controller--validating-webhook=:8443--validating-webhook-certificate=/usr/local/certificates/cert--validating-webhook-key=/usr/local/certificates/key--watch-ingress-without-class=true--enable-metrics=falseRequests:
cpu: 100mmemory: 90MiLiveness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=5Readiness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=3Environment:
POD_NAME: (v1:metadata.name)POD_NAMESPACE: (v1:metadata.namespace)LD_PRELOAD: /usr/local/lib/libmimalloc.soMounts:
/usr/local/certificates/ from webhook-cert (ro)Volumes:
webhook-cert:
Type: Secret (a volume populated by a Secret)SecretName: rke2-ingress-nginx-admissionOptional: falseNode-Selectors: kubernetes.io/os=linuxTolerations: <none>Events: <none>
Describing daemonset of 2nd ingress controller
Name: rke2-ingress-nginx-abcx3-controllerSelector: app.kubernetes.io/component=controller,app.kubernetes.io/instance=rke2-ingress-nginx-abcx3,app.kubernetes.io/name=rke2-ingress-nginxNode-Selector: kubernetes.io/os=linuxLabels: app.kubernetes.io/component=controllerapp.kubernetes.io/instance=rke2-ingress-nginx-abcx3app.kubernetes.io/managed-by=Helmapp.kubernetes.io/name=rke2-ingress-nginxapp.kubernetes.io/part-of=rke2-ingress-nginxapp.kubernetes.io/version=1.10.1helm.sh/chart=rke2-ingress-nginx-4.10.101Annotations: deprecated.daemonset.template.generation: 10meta.helm.sh/release-name: rke2-ingress-nginx-abcx3meta.helm.sh/release-namespace: abcx3appsDesired Number of Nodes Scheduled: 10Current Number of Nodes Scheduled: 10Number of Nodes Scheduled with Up-to-date Pods: 10Number of Nodes Scheduled with Available Pods: 10Number of Nodes Misscheduled: 0Pods Status: 10 Running / 0 Waiting / 0 Succeeded / 0 FailedPod Template:
Labels: app.kubernetes.io/component=controllerapp.kubernetes.io/instance=rke2-ingress-nginx-abcx3app.kubernetes.io/managed-by=Helmapp.kubernetes.io/name=rke2-ingress-nginxapp.kubernetes.io/part-of=rke2-ingress-nginxapp.kubernetes.io/version=1.10.1helm.sh/chart=rke2-ingress-nginx-4.10.101Service Account: rke2-ingress-nginx-abcx3Containers:
rke2-ingress-nginx-controller:
Image: rancher/nginx-ingress-controller:v1.10.1-hardened1Ports: 8082/TCP, 8083/TCP, 8443/TCPHost Ports: 8082/TCP, 8083/TCP, 0/TCPSeccompProfile: RuntimeDefaultArgs:
/nginx-ingress-controller--publish-service=$(POD_NAMESPACE)/rke2-ingress-nginx-abcx3-controller--election-id=rke2-ingress-nginx-abcx3-leader--controller-class=k8s.io/ingress-nginx-abcx3--ingress-class=nginx-abcx3--configmap=$(POD_NAMESPACE)/rke2-ingress-nginx-abcx3-controller--validating-webhook=:8443--validating-webhook-certificate=/usr/local/certificates/cert--validating-webhook-key=/usr/local/certificates/key--ingress-class-by-name=true--enable-metrics=false--tcp-services-configmap=$(POD_NAMESPACE)/abc-servicesRequests:
cpu: 100mmemory: 90MiLiveness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=5Readiness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=3Environment:
POD_NAME: (v1:metadata.name)POD_NAMESPACE: (v1:metadata.namespace)LD_PRELOAD: /usr/local/lib/libmimalloc.soMounts:
/usr/local/certificates/ from webhook-cert (ro)Volumes:
webhook-cert:
Type: Secret (a volume populated by a Secret)SecretName: rke2-ingress-nginx-abcx3-admissionOptional: falseNode-Selectors: kubernetes.io/os=linuxTolerations: <none>Events: <none>
To reproduce issue First we will use 2nd ingress controller whose ingressclass is nginx-abcx3 and same deployment yaml and ingress yaml in both scenario
-** deployment yaml**
Let's apply yamls and see ingress controller logs and deployment status
NAME READY STATUS RESTARTS AGE
pod/sample-app-587d9c6687-rsz8m 1/1 Running 0 45s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/sample-app-service ClusterIP 10.43.7.240 <none> 80/TCP 40s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/sample-app 1/1 1 1 45s
NAME DESIRED CURRENT READY AGE
replicaset.apps/sample-app-587d9c6687 1 1 1 45s
NAME CLASS HOSTS ADDRESS PORTS AGE
sample-app-ingress nginx-abcx3 x3.abc.com 10.11.XXX.74 80 4m41s
Lets try to access the application in browser we get below error
Lets see curl output
$ curl -iv http://x3.abc.com/sample
*Uses proxy env variable no_proxy == 'mumrhnsat.abcmcloud.com,127.0.0.0/8,XX.0.0.0/8,XXX.16.0.0/12,192.XXX.0.0/16,.svc,.cluster.local,10.XX.0.0,10.XX.0.0,10.XX.0.0,127.0.0.1,localhost,.abc.com'
* Trying 10.11.XXX.74...
* TCP_NODELAY set
* connect to 10.11.XXX.74 port 80 failed: Connection timed out
* Failed to connect to x3.abc.com port 80: Connection timed out
* Closing connection 0
curl: (7) Failed to connect to x3.abc.com port 80: Connection timed out
Now let's keep everything same and just change ingressclass of ingress resource to use ingressclass of 1st igress controller i.e nginx
Let's apply ingress yaml and see site in browser
kubectl get ing -n abcx3ns
NAME CLASS HOSTS ADDRESS PORTS AGE
sample-app-ingress nginx y3.abc.com 10.11.XXX.71 80 40s
1st ingress controller logs
I1122 10:12:49.193915 7 controller.go:193] "Configuration changes detected, backend reload required"
I1122 10:12:49.308725 7 controller.go:213] "Backend successfully reloaded"
I1122 10:12:49.309046 7 event.go:364] Event(v1.ObjectReference{Kind:"Pod", Namespace:"kube-system", Name:"rke2-ingress-nginx-controller-bc475", UID:"e2e1a0f8-0f22-467c-98ef-fe1b3d47534c", APIVersion:"v1", ResourceVersion:"64608400", FieldPath:""}): type: 'Normal' reason: 'RELOAD' NGINX reload triggered due to a change in configuration
I1122 10:13:11.053653 7 event.go:364] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"abcx3ns", Name:"sample-app-ingress", UID:"2ef0e5c5-2e6f-4607-a216-ce7bd2d514f9", APIVersion:"networking.k8s.io/v1", ResourceVersion:"90250061", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
W1122 10:13:11.054344 7 controller.go:1110] Error obtaining Endpoints for Service "domino-platform/nosuchservice": no object matching key "domino-platform/nosuchservice" in local store
And now site is accessible in browser
With ingress resource of 1st ingress controller we are able to access the site in browser but with 2nd ingress controller not a single application is accessible.
Hi Sir,
Could please help me to figure out what's issue here, We have deployed two nginx ingress controller in two different namespaces
1st ingress controller is working fine but when i'm using 2nd ingress controller it's not working. Could you please help it would be appreciated sir.
What happened:
We have deployed two Nginx ingress controller in our cluster. The first ingress controller works fine but we are facing issue with second one. When accessing the service through second ingress controller (http://x3.abc.com/sample), we get This site can’t be reached x3.abc.com took too long to respond. error. We followed the same step as the first ingress controller including assigning different IP address using metallb and different ingress class in different namespace.
What you expected to happen:
For testing purpose we deployed a simple nginx image using standard yaml files. Everything is up and running, No error logs in pods, service mapped correct endpoints and ingress resource got external IP assigned by Second nginx ingress controller But when we try to access http://x3.abc.com/sample gives Site can't be reached error.
NGINX Ingress controller version:
NGINX Ingress controller
Release: v1.10.1-hardened1
Build: git-b48c66a2f
Repository: https://github.com/rancher/ingress-nginx
nginx version: nginx/1.25.3
Kubernetes version:
Client Version: v1.30.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.11+rke2r1
Environment:
Cloud provider or hardware configuration: Metallb
OS: Red Hat Enterprise Linux
Kernel (e.g.
uname -a
): LinuxRKE2 Version: v1.28.11
Metallb Version: v0.14.5
How was the ingress-nginx-controller installed:
-Below is the second nginx ingress controller passed values
helm -n abcx3apps get values rke2-ingress-nginx-abcx3
Below is User values passed for 1st nginx ingress controller
-Below is the 2nd nginx ingress details:
-kubectl get all -n abcx3apps
-Below is the 1st nginx ingress details:
-kubectl get all -n kube-system
kubectl describe ingressclasses
-Current State of the 1st nginx ingress controller:
-Below is description of 1st ingress controller service
kubectl -n <ingresscontrollernamespace> describe svc <ingresscontrollerservicename>
-Below is description of 2nd ingress controller service
kubectl -n <ingresscontrollernamespace> describe svc <ingresscontrollerservicename>
Below are the logs of 1st ingress controller pods No error logs
Below are the logs of 2nd ingress controller pods No error logs
To reproduce issue
First we will use 2nd ingress controller whose ingressclass is nginx-abcx3 and same deployment yaml and ingress yaml in both scenario
-** deployment yaml**
-** service yaml**
Ingress yaml
Let's apply yamls and see ingress controller logs and deployment status
Ingress controller logs
Lets try to access the application in browser we get below error
Lets see curl output
Now let's keep everything same and just change ingressclass of ingress resource to use ingressclass of 1st igress controller i.e nginx
-Ingress resource of 1st ingress controller
Let's apply ingress yaml and see site in browser
kubectl get ing -n abcx3ns
1st ingress controller logs
And now site is accessible in browser
With ingress resource of 1st ingress controller we are able to access the site in browser but with 2nd ingress controller not a single application is accessible.
lets see curl output of y3.abc.com
curl -iv http://y3.abc.com/sample
The text was updated successfully, but these errors were encountered: