'Istio Virtual service dark launch (deployment) Header exact not working
Currently i have an architecture where my API Gateway (http) is exposed to users and i have many internal services (gRPC) running. So the user request propagate as API Gateway (http) --> users service (gRPC). I am running two pods for users service ( v1 and v2) in AWS EKS.
I want to do a dark launch where istio will forward request to users-v2 pod only if the request has 'x-testing = tester' header value.
i have some questions, i believe the http headers will propagate from API gateway to users service.
Below are my configs
Deployments
apiVersion: apps/v1
kind: Deployment
metadata:
name: users-v2
labels:
app: users
version: v2
spec:
replicas: 1
selector:
matchLabels:
app: users
version: v2
template:
metadata:
labels:
app: users
version: v2
spec:
serviceAccountName: kappa-users
containers:
- name: users
image: users:0.0.1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9090
env:
- name: USERS_PORT
value: '9090'
Virtual service
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: users
spec:
hosts:
- users
http:
- match:
- headers:
x-testing:
exact: tester
route:
- destination:
host: users
subset: v2
- route:
- destination:
host: users
subset: v1
Destination Rule
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: users
spec:
host: users
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
Can you please help me
Thanks,
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|