Questions tagged [nginx-ingress]
The NGINX Ingress Controller for Kubernetes is an alternative Kubernetes ingress controller that can be used instead of the default ingress controller.
107
questions
13
votes
1
answer
6k
views
Kubernetes v1.24.3 upgrade broke ingress-nginx
After upgrading our AKS kubernetes cluster to from v1.23.8 to v1.24.3 our ingress stopped working properly. No errors logged in events and the ingress-nginx pod does not report any errors on the ...
13
votes
2
answers
41k
views
How to rewrite url to backend while preserving browser url in nginx ingress?
I'm trying to rewrite the path to the service while preserving the browser url with nginx ingress on kubernetes.
What I need is this:
http://example.com/path => http://service
http://example.com/...
7
votes
1
answer
8k
views
400 Error with nginx-ingress to Kubernetes Dashboard
I have an ingress that connects to Kubernetes Dashboard, but I'm getting a 400 error when trying to access it.
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: kubernetes-...
5
votes
1
answer
10k
views
k8s nginx ingress returns randomly 502 error on load
we are using an nginx (1.15.8.1) as ingress controller on our k8s cluster (v.1.17), managed by rancher (2.5.7).
This worked pretty fine so far, but now we set up a custom API pod that can be ...
4
votes
2
answers
12k
views
Configure external IP redirect inside the Nginx Ingress controller
Question
I would like to know how to configure the Nginx Ingress controller to redirect to a URL when calling the external IP address.
Ingress controller yaml
apiVersion: v1
kind: Service
metadata:
...
4
votes
1
answer
2k
views
Ensuring at least one ingress-nginx per kubernetes node
I'm trying to write an autoscaling configuration for ingress-nginx, deployed via helm chart.
my goals are:
3 minimum replicas (because I have 3 nodes minimum)
ensure only one nginx per node, but:
be ...
3
votes
2
answers
11k
views
How to solve error 503 in Kubernetes NGINX Ingress
I'm trying to access Kubernetes Dashboard using NGINX INGRESS but for some reason I'm getting a 503 error.
I'm running Kubernetes locally in my macbook with docker desktop.
First thing I did was apply/...
3
votes
1
answer
11k
views
How to properly configure access to kubernetes dashboard behind nginx ingress
I'm trying to configure nginx ingress to access several services, like this:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-monit
spec:
rules:
- host: grafana.localhost
...
3
votes
1
answer
411
views
Malicious requests from private network (Kubernetes)
Recently I'm having many malicious requests to my nginx-ingress pod but I don't understand how's possible they're from a private network. Some examples:
10.114.0.3 - - [11/Oct/2021:09:07:09 +0000] &...
3
votes
1
answer
5k
views
Kubernetes: How to force kube-proxy to listen on localhost only
In my configuration, very basic one (Only calico network, no apps yet)
I have nginx-ingress running as NodePort - binding on port 30080. This port should be accessible only from localhost, but k8s ...
3
votes
1
answer
1k
views
Forward real requestor IP in K3S NGINX ingress
I've set up a K3S Kubernetes Environment in my private Home-Lab on Raspberry PIs in order to teach myself some Kubernetes (Noob-Alert), using NGINX as Ingress Controller and I'm kind of stuck at ...
3
votes
1
answer
4k
views
Nginx Ingress Rewrite Rule
I have a spring microservice running on k8s having 2 API URL's.
First is /api/actuator for health check - running on port 9010
Second is /api for all other api calls - running on port 9000
I have ...
3
votes
1
answer
1k
views
GCP - Loadbalancer pricing when using nginx ingress controller
How to calculate the pricing for GCP loadbalancers when using nginx ingress controller?
Right now I have 1 Ingress host and a single rule for prod website. But I want to launch another for internal ...
2
votes
1
answer
10k
views
Kubernetes Nginx ingress timeout for two requests only
In our k8s ingress configuration we set timeout to 10min and its applying to all requests. Is it possible to configure timeout only to two requests like /my-service/v1/processfile and /my-service/v1/...
2
votes
1
answer
4k
views
Kubernetes ingress 502 bad gateway on DigitalOcean
I am trying to deploy a NestJS app with Kubernetes on DigitalOcean and I have followed this tutorial, but I am always getting a 502 Bad Gateway from the nginx-ingress-controller.
That's my deployment....
2
votes
4
answers
14k
views
HTTPS 308 permanent redirection k8s ingress nginx
I have created an EKS cluster following the examples from AWS EKS, I have deployed the nginx ingress controller on top from kubernetes/nginx, Created an ingress resource which points to back end k8s ...
2
votes
1
answer
564
views
How to debug why a Ingress Controller in MicroK8S is pointing to the wrong service?
I have built a little three-node Kubernetes cluster at home, for learning purposes. Each 16GB node runs Ubuntu Server and MicroK8S. I have set up a leader (arran) and two followers (nikka and yamazaki)...
2
votes
2
answers
3k
views
How to implement caching of HTTP responses in Kubernetes?
How can I cache HTTP responses from my services in Kubernetes?
I have a simple web service in my cluster and am wondering how I could cache static assets (static html, images, fonts, etc.) beyond ...
2
votes
1
answer
3k
views
NGINX Ingress on Kubernetes doesn't use HTTPS
I am setting a Kubernetes cluster on bare metal. I used Kubeadm for the installation. To make my services accessible from outside the cluster, I installed an NGINX Ingress, using the following ...
2
votes
0
answers
494
views
Access of K8s service within WSL2 + Docker Desktop from Linux machine over HTTPS
I've setup an authentication service in a Kubernetes cluster which lives in a Docker Desktop + WSL2 environment on a Windows 11 Pro machine.
It can be reached e.g. via CURL & PostMan requests from ...
2
votes
0
answers
285
views
How can I use a plugin in ingress-nginx to wrap a request?
I'm trying to use the lua-circuit-breaker plugin with ingress-nginx in a Kubernetes cluster. I want to set up two upstream servers such that the first is "wrapped" with this circuit breaker, ...
2
votes
2
answers
1k
views
Django + Gunicorn + Kubernetes: Website down few minutes on new deployment
I am having this issue with Django + Gunicorn + Kubernetes.
When I deploy a new release to Kubernetes, 2 containers start up with my current image. Once Kubernetes registers them as ready, which they ...
2
votes
0
answers
3k
views
ingress returns 502 / TLS backend communication issue
i am operating a k8s cluster with cert-managerto obtain letsencrypt certs. I just set up nifi (https://github.com/cetic/helm-nifi) within this cluster, where the workload exposes a TLS secured port ...
2
votes
1
answer
2k
views
Expose Kubernetes cluster behind a pfSense
I installed a Kubernetes cluster on a Bare-metal sever.
This server contains a Proxmox hypervisor, I have the following virtual machines
a pfSense (192.168.9.254)
two masters for the Kubernetes ...
1
vote
1
answer
2k
views
How to block/allow a country in Nginx ingress
Hello is it possible to block or allow certain countries in Nginx Ingress (community). It seems possible on Nginx installed on servers (link)
But I want to apply similarly to this on Nginx Ingress.
1
vote
1
answer
4k
views
Ingress controller not showing nginx access/error logs
I'm trying to troubleshoot a 404 message on my ingress. When I view logs using kubectl logs -n ingress-nginx ingress-nginx-controller-xxxxxx -f I don't see any output when making a request to the URL. ...
1
vote
1
answer
44
views
How to safely update an existing Kubernetes server without original configurations
I was handed a Kubernetes cluster with no config files, and was not setup with helm. The author said they just created everything from the cmd line. It is a small/new cluster for a single API server ...
1
vote
1
answer
75
views
nginx rewrite rules wildcards
I am trying to do the following nginx redirect
/product/reports/v1/stores(/|$)(.*)
to
/stores(/|$)(.*)
seems like it should be simple but I can not get it to work. My intention is to use the nginx....
1
vote
1
answer
341
views
VMWare Workstation and Windows 10: can't connect to a server hosted on VM
I have a private 2 nodes Kubernetes cluster configured on VMWare Workstation 15. I'm using MetalLB and Calico.
Ingress service and ingress look like:
xxx@c1-cp1:~/Desktop$ kubectl get svc -n ingress-...
1
vote
1
answer
531
views
Providing a flag to NGINX Ingress Controller that doesn't run as a Deployment
In general, my question about setting up a default certificate is answered here: Kubernetes ingress How to set default-ssl-certificate?.
What I don't understand is this part: I'm supposed to add the ...
1
vote
2
answers
8k
views
502 error with nginx-ingress in Kubernetes to custom endpoint
I have an ingress that routes to a custom endpoint external to the kubernetes cluster. The service listens only on HTTPS on port 8006.
apiVersion: v1
kind: Service
metadata:
name: pve
spec:
ports:...
1
vote
1
answer
247
views
gRPC bidirectional streaming client sometimes close rpc unexpected EOF to server behind Nginx Ingress
I am faced with the issue that a gRPC Client in Bidirectional streaming call to the server behind an AWS NLB, nginx ingress controller sometimes throws er "close rpc error: code = Internal desc = ...
1
vote
0
answers
1k
views
Is it possible to have multiple ingress paths under the same host that point to the same backend service
I'm trying to restrict access to certain paths on my service how can I accomplish this on kubernetes?
I have a service that runs a basic API but it also runs an admin service. Is it possible to use ...
1
vote
0
answers
2k
views
Nginx Ingress Controller - configure cookie stickiness and upstream hash by request
I am running nginx as an ingress controller for my Kubernetes cluster and I have a use case where I am using cookie affinity to persist the client to a specific pod for session purpose.
I am using the ...
1
vote
0
answers
1k
views
Disable CORS using kubernetes ingress
Is it possible to forcefully disable CORS using kubernetes nginx ingress when the application is allowing CORS?
I have an application that I believe is sending Access-Control-Allow-Credentials:true ...
1
vote
0
answers
191
views
Set up Kubernetes Ingress Nginx in AWS
set up a kubernetes cluster locally and make kubernetes-ingress-nginx works correctly.
Now I would like to deploy it on AWS. I set up the kubernetes cluster using kubeadm and it's working correctly.
...
1
vote
0
answers
3k
views
Updating ingress-nginx helm chart for kubernetes 1.23.5
I am having lots of issues that seem to stem from upgrading my kubernetes cluster to the latest version (1.23.5). I initially had some issues with the cluster itself and the nodes but that seems to be ...
1
vote
0
answers
1k
views
How to enable ipv6 for ingress-controller services when installing using Helm nginx-ingress chart?
I have a baremetal K8 cluster setup using Kubespray (Calico as CNI) and have dual stack enabled. I can see that all the pods that get deployed get both IPv4 and IPv6 addresses but when I try to ...
1
vote
1
answer
264
views
how to configure ingress controller in kubernetes cluster over bare metal system?
Is there any way to assign static IP to Kubernetes cluster, in which any user can able to access its application over static IP only.
for an example, I have set up a cluster over 192.168.0.131 (master)...
1
vote
0
answers
599
views
Nginx rewrite and return interfere with different location block
I have the following configuration in nginx for redirecting in a certain scenario.
location /prefix-someurl {
if (condition) {
return 301 $scheme://$host/xyz.html;
}
proxy_pass ...
1
vote
0
answers
1k
views
custom error pages for nginx ingress controller
I was trying to get nice error pages, when my kubernetes service is not working (replicas: 0). So I found the following resources:
https://github.com/kubernetes/ingress-nginx/tree/master/docs/...
1
vote
0
answers
2k
views
nginx-ingress 400 error with websockets
Trying to host an app, specifically Foundry VTT, on my k8s cluster. It connects fine, but websockets (any url starting with /socket.io/ are giving me a 400 error.
Googling how to enable websocket ...
1
vote
0
answers
282
views
Ingress not working with cloudflare proxy option
I have cloudflare on it added A record of haproxy loadbalancer, behind loadbalancer are worker nodes of kubernetes cluster and ingress controller.
Ingress routing traffic good when proxy option on ...
0
votes
1
answer
948
views
Preventing directory traversal in nginx ingress in Kubernetes
I have the following ingress defined:
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: someName
namespace: test
annotations:
kubernetes.io/ingress.class: "ingress-public&...
0
votes
1
answer
595
views
How to allow a tcp service (not http) on custom port inside kubernetes
I have a container running an OPC-server on port 4840. I am trying to configure my microk8s to allow my OPC-Client to connect to the port 4840. Here are examples of my deployment and service:
(No ...
0
votes
1
answer
405
views
nginx-ingress returns 502 After upgrading to kubernetes v1.24.6
When trying to upgrade from kubernetes v1.23.X to v1.24.X.
I has been seen that the health probe needs to be changed to be /healthz (azure)
I have a configuration that works in 1.23 but not 1.24
I ...
0
votes
2
answers
46
views
How do I redirect "old.foo.com/foo" to "new.foo.com/foo" with a NGINX K8S ingress, without breaking cert-manager?
In my K8S ingress config, I'm trying to redirect from (for example) old.mywebsite.com to new.mywebsite.com.
I can do this with the nginx.ingress.kubernetes.io/permanent-redirect annotation, but ...
0
votes
1
answer
481
views
Ingress in GKE does not do the routing identically despite same IP at DNS level
I have setup in my GKE cluster an nginx ingress as follows:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install ingress-nginx ingress-nginx/ingress-nginx --namespace ...
0
votes
1
answer
645
views
Nginx Ingress-Controller Load Balancing
I was wondering how does the ingress controller make sure that the incoming requests for the K8S cluster is load-balanced between all the K8S nodes.
I know that with some other ingress controllers ...
0
votes
1
answer
3k
views
Access-Control-Allow-Origin value overrided for OPTIONS requests
I am trying to enable CORS for multiple subdomains, like was suggested here:
https://serverfault.com/a/1022028/593976
It works fine, except for OPTIONS requests. No matter what I do when the request ...