kubernetes-ingress

“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

Kubernetes requests not balanced

旧街凉风 提交于 2021-01-05 11:25:37
问题 We've just had an increase in traffic to our kubernetes cluster and I've noticed that of our 6 application pods, 2 of them are seemingly not used very much. kubectl top pods returns the following You can see of the 6 pods, 4 of them are using more than 50% of the CPU (2 vCPU nodes), but two of them aren't really doing much at all. Our cluster is setup on AWS, using the ALB ingress controller. The load balancer is configured to use the Least outstanding requests rather than Round robin in an

How to set AWS ALB instead of ELB in Istio?

蹲街弑〆低调 提交于 2020-12-30 08:55:31
问题 I am trying to setup ALB load balancer instead of default ELB loadbalancer in Kubernetes AWS.The loadbalancer has to be connected to the istio ingressgateway.I looked for solutions and only found one. But the istio version mentioned is V1 and there has been so many changes in istio now.I tried to change service type to nodeport in the chart (according to the blog)but still the service comes as a Loadbalancer. Can someone mention steps how to configure ALB for istio ingressgateway? Thanks for

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 use nginx ingress to route traffic based on port

梦想与她 提交于 2020-12-13 03:35:58
问题 I'm currently working on deploying ELK stack on kubernetes cluster, i was successfully able to use ClusterIP service and nginx-ingress on minikube to route inbound http traffic to kibana (5601 port), need inputs on how i can route traffic based on inbound port rather than path? Using below Ingress object declaration, i was successfully able to connect to my kibana deployment, but how can i access other tools stack exposed on different ports (9200, 5044, 9600)? --- apiVersion: extensions

Kubernetes Ingress + Apache airflow

耗尽温柔 提交于 2020-12-13 03:07:38
问题 Can you please help me? I'm trying to start Apache airflow in Kubernetes (AWS), in vpc. I'm using helm stable/airflow 7.1.1 Everything starts ok. But to get access to web interface I need to expose it via ingress ELB. I have this setup. The rule for airflow looks like this: apiVersion: v1 items: - apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/connection-proxy-header: upgrade nginx.ingress.kubernetes.io

Kubernetes ingress redirects http to https

拟墨画扇 提交于 2020-12-12 06:14:17
问题 I need some help from the community, I'm pretty new to kubernetes. I need the URL of my host defined in the "deployment.yaml" file to redirect from http to https using whatever technique. Next I am going to leave the infrastructure as the code I have. Deployment.yaml: apiVersion: apps/v1 kind: Deployment metadata: name: web namespace: default spec: selector: matchLabels: run: web template: metadata: labels: run: web spec: containers: - image: gcr.io/google-samples/hello-app:1.0

Ingress controller name for the ingress class

▼魔方 西西 提交于 2020-12-07 03:41:15
问题 I am setting up my ingress controller, ingress class and ingress to expose a service outside the cluster. This is fresh cluster setup. I have setup the nginx-ingress controller using kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.41.0/deploy/static/provider/baremetal/deploy.yaml The next step based on my understanding is to create the ingress class https://v1-18.docs.kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class apiVersion: