kubernetes-ingress

Rewrite only specific route with nginx Ingress

◇◆丶佛笑我妖孽 提交于 2021-02-07 07:00:22
问题 I have three services running in my backend and the Ingress routing is defined like this: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: myapp-ingress annotations: kubernetes.io/ingress.class: nginx certmanager.k8s.io/cluster-issuer: letsencrypt-prod nginx.ingress.kubernetes.io/rewrite-target: / spec: tls: - hosts: - myapp.westeurope.cloudapp.azure.com secretName: acme-crt-secret rules: - host: myapp.westeurope.cloudapp.azure.com http: paths: - path: / backend: serviceName:

How to add custom port for istio ingress gateway?

≡放荡痞女 提交于 2021-02-07 04:11:23
问题 I'm new to istio. I have a simple ingress gateway yaml file, and the listenling port is 26931, but after I applied the yaml, the port 26931 does not appear in the set of ports which ingress gateway expose. So am I lack of some necessary step or something else? apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: batman-gateway spec: selector: istio: ingressgateway servers: - port: number: 26931 name: http protocol: HTTP hosts: - "*" 回答1: You are exposing ports not with

How to add custom port for istio ingress gateway?

折月煮酒 提交于 2021-02-07 04:07:30
问题 I'm new to istio. I have a simple ingress gateway yaml file, and the listenling port is 26931, but after I applied the yaml, the port 26931 does not appear in the set of ports which ingress gateway expose. So am I lack of some necessary step or something else? apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: batman-gateway spec: selector: istio: ingressgateway servers: - port: number: 26931 name: http protocol: HTTP hosts: - "*" 回答1: You are exposing ports not with

TLS doesn't work with LoadBalancer backed Service in Kubernetes

旧时模样 提交于 2021-02-05 09:32:29
问题 I am trying to expose an application in my cluster by creating a service type as load balancer. The reason for this is that I want this app to have a separate channel for communication. I have a KOPS cluster. I want to use AWS's network load balancer so that it gets a static IP. When I create the Service with port 80 mapped to the port that the app is running on everything works but when I try to add port 443 it just times out. Here is the configuration that works - apiVersion: v1 metadata:

microk8s + ingress: ingressed service always resolves to 127.0.0.1 and not pod ip

谁说我不能喝 提交于 2021-02-05 07:10:02
问题 I am learning about microk8s and how ingress works. I have a single node microk8s (v1.18.4) with the following add-ons: DNS, ingress, RBAC, storage I am trying to get it working with the microbot example. I've read (and reread) through the tutorial but, the address, once the ingress manifest is applied results with the microbot service, routed to 127.0.0.1 (and not the internal pod IP). I am attempting to access the app: http://192.168.91.166/microbot via web external to the vm that it's

microk8s + ingress: ingressed service always resolves to 127.0.0.1 and not pod ip

喜你入骨 提交于 2021-02-05 07:09:26
问题 I am learning about microk8s and how ingress works. I have a single node microk8s (v1.18.4) with the following add-ons: DNS, ingress, RBAC, storage I am trying to get it working with the microbot example. I've read (and reread) through the tutorial but, the address, once the ingress manifest is applied results with the microbot service, routed to 127.0.0.1 (and not the internal pod IP). I am attempting to access the app: http://192.168.91.166/microbot via web external to the vm that it's

ingress nginx redirect from www to https

房东的猫 提交于 2021-01-29 13:58:14
问题 I'm trying to redirect http://www... and https://www... to https://... using ingress-nginx. How can I do that? I've tried adding the following custom configuration using the annotation nginx.ingress.kubernetes.io/server-snippet and nginx.ingress.kubernetes.io/configuration-snippet : # 1 if($host = "www.example.com") { return 308 https://example.com$request_uri; } # 2 server { server_name www.example.com; return 308 https://example.com$request_uri; } # 3 server_name www.example.com; return 308

How to run Postman test cases by helm and rollback to last successful version if any test fail

风流意气都作罢 提交于 2021-01-29 11:17:11
问题 I am using Helm kubernetes deployment and I want to run the postman test cases before a final deployment, and if any test case fails then rollback (or retain the current deployment like Blue-Green deployment). How to achieve this? 回答1: I achieved the expected behavior with Helm Chart Tests and the postman/newman Docker image. My Helm template for the test execution: apiVersion: v1 kind: Pod metadata: name: API Test annotations: "helm.sh/hook": test-success spec: containers: - name:

How to redirect custom subdomain of a domain to a single kubernetes service with subdomain as parameter/ path?

ε祈祈猫儿з 提交于 2021-01-29 11:08:46
问题 I have a requirement for a multitenant application where each tenant should be separated by sub domains like below t1.example.com t2.example.com t3.example.com . . . tn.example.com So there could be any number of tenants in this case. I have a Kubernetes Backend Service named myservice responsible for handling all those requests and they need to be identified based on their subdomain. e.g. if the request comes from tn.example.com then it needs to be redirected to the -> myservice/tn . t2

Kubernetes - Ingress-nginx routing error (Cannot connect frontend to backend)

强颜欢笑 提交于 2021-01-29 10:11:30
问题 Need some serious help here ! Thanks in advance. I am trying to deploy a microservice based Java application. I am able to get to the frontend service(webapp) on my browser, but I am unable to connect it with the backend (auth service) and hence it shows authentication failure. HTML LOGIN FORM form points to "/login?referrerURL=" I checked the ingress nginx logs : Service "default/auth-srv" does not have any active Endpoint. Service "default/voice-srv" does not have any active Endpoint.