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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have one host and 2 services with different path. I also created two ingress and corresponding two HttpScaledObject with same pathPrefix of ingress.
********* Application -1 ***************
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: demo-1-ingress
labels:
demo-1-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
http:
paths:
pathType: Prefix
backend:
service:
name: demo-1-proxy-svc
port:
number: 8080
kind: HTTPScaledObject
apiVersion: http.keda.sh/v1alpha1
metadata:
name: demo-1-http-scaledobject
spec:
hosts:
- mycompany.com
pathPrefix: /demo-1
targetPendingRequests: 1
scaledownPeriod: 30
scaleTargetRef:
deployment: demo-1
service: demo-1-svc
port: 8080
replicas:
min: 0
max: 3
Kind: Service
apiVersion: v1
metadata:
name: demo-1-proxy-svc
spec:
type: ExternalName
externalName: keda-add-ons-http-interceptor-proxy.keda.svc.cluster.local
****************** Application 2 ******************
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: demo-2-ingress
labels:
demo-2-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
http:
paths:
pathType: Prefix
backend:
service:
name: demo-2-proxy-svc
port:
number: 8080
kind: HTTPScaledObject
apiVersion: http.keda.sh/v1alpha1
metadata:
name: demo-2-http-scaledobject
spec:
hosts:
- mycompany.com
pathPrefix: /demo-2
targetPendingRequests: 1
scaledownPeriod: 30
scaleTargetRef:
deployment: demo-2
service: demo-2-svc
port: 8080
replicas:
min: 0
max: 3
Kind: Service
apiVersion: v1
metadata:
name: demo-2-proxy-svc
spec:
type: ExternalName
externalName: keda-add-ons-http-interceptor-proxy.keda.svc.cluster.local
Let's consider both services are deployed in same namespace (tried different namespace too). is above scenario work?
I am calling service 2 but request was forwarded to service 1.
Beta Was this translation helpful? Give feedback.
All reactions