nginx-ingress

“rewrite-target” failing when routing to React.js app on nginx server

拈花ヽ惹草 提交于 2021-01-07 02:53:16
问题 I have a React app which I build and dockerize to be hosted on a nginx server. FROM nginx:latest COPY build /usr/share/nginx/html I then create a simple deployment and service for it (which I very much doubt are the problem). Next I create an nginx ingress. apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: my-app-ingress annotations: kubernetes.io/ingress.class: "nginx" nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/rewrite-target: / spec:

“rewrite-target” failing when routing to React.js app on nginx server

混江龙づ霸主 提交于 2021-01-07 02:50:22
问题 I have a React app which I build and dockerize to be hosted on a nginx server. FROM nginx:latest COPY build /usr/share/nginx/html I then create a simple deployment and service for it (which I very much doubt are the problem). Next I create an nginx ingress. apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: my-app-ingress annotations: kubernetes.io/ingress.class: "nginx" nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/rewrite-target: / spec:

Two Flask apps on different paths with Kubernetes Ingress resource (nginx)

半世苍凉 提交于 2021-01-07 01:32:53
问题 My goal is the following: I have two Flask apps in two separate Docker containers and I want to access them via different paths on the same IP address, like this: 127.0.0.1/app1, 127.0.0.1/app2 (but with a real IP address). I want to do this with Kubernetes. I have a Kubernetes cluster running (Azure Kubernetes Service), with a Deployment and Service for each of the two Docker containers. The pod for each app is running fine. I also installed an ingress controller (Nginx) in my cluster and

Using self-signed certificates in nginx Ingress

徘徊边缘 提交于 2021-01-07 01:30:43
问题 I'm migrating services into a kubernetes cluster on minikube, these services require a self-signed certificate on load, accessing the service via NodePort works perfectly and demands the certificate in the browser (picture below), but accessing via the ingress host (the domain is modified locally in /etc/hosts) provides me with a Kubernetes Ingress Controller Fake Certificate by Acme and skips my self-signed cert without any message. The SSLs should be decrypted inside the app and not in the

Using self-signed certificates in nginx Ingress

家住魔仙堡 提交于 2021-01-07 01:24:06
问题 I'm migrating services into a kubernetes cluster on minikube, these services require a self-signed certificate on load, accessing the service via NodePort works perfectly and demands the certificate in the browser (picture below), but accessing via the ingress host (the domain is modified locally in /etc/hosts) provides me with a Kubernetes Ingress Controller Fake Certificate by Acme and skips my self-signed cert without any message. The SSLs should be decrypted inside the app and not in the

Set limit_req for specific location in Nginx Ingress

被刻印的时光 ゝ 提交于 2020-12-15 06:06:20
问题 I'm trying to setup rate limiting option limit_req for specific path in Kubernetes ingress-nginx to prevent brute-forcing authentication. I've defined limit_req_zone using ConfigMap: http-snippet: | limit_req_zone $the_real_ip zone=authentication_ratelimit:10m rate=1r/s; Next, I'm using annotation to add a custom location block: nginx.ingress.kubernetes.io/configuration-snippet: | location ~* "^/authenticate$" { limit_req zone=authentication_ratelimit nodelay; more_set_headers "x-test:

Set limit_req for specific location in Nginx Ingress

余生颓废 提交于 2020-12-15 06:03:49
问题 I'm trying to setup rate limiting option limit_req for specific path in Kubernetes ingress-nginx to prevent brute-forcing authentication. I've defined limit_req_zone using ConfigMap: http-snippet: | limit_req_zone $the_real_ip zone=authentication_ratelimit:10m rate=1r/s; Next, I'm using annotation to add a custom location block: nginx.ingress.kubernetes.io/configuration-snippet: | location ~* "^/authenticate$" { limit_req zone=authentication_ratelimit nodelay; more_set_headers "x-test:

How to expose an Azure Kubernetes cluster with a public IP address using Terraform

廉价感情. 提交于 2020-12-06 06:47:06
问题 I'm having trouble to expose a k8s cluster deployed on AKS with a public IP address. I'm using GitHub Actions to do the deployment. The following are my .tf and deployment.yml files; Please see below the errors I'm facing. main.tf provider "azurerm" { features {} } provider "azuread" { version = "=0.7.0" } terraform { backend "azurerm" { resource_group_name = "tstate-rg" storage_account_name = "tstateidentity11223" container_name = "tstate" access_key = "/qSJCUo..." key = "terraform.tfstate"