Closed
Description
Is this the right place to submit this?
- This is not a security vulnerability or a crashing bug
- This is not a question about how to use Istio
Bug Description
My configuration below.
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: vs-0
spec:
hosts:
- '*.example.com'
http:
- route:
- destination:
host: productpage.default.svc.cluster.local
subset: v1
port:
number: 9080
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: dr-0
spec:
host: productpage.default.svc.cluster.local
subsets:
- name: v1
labels:
version: v1
workloadSelector:
matchLabels:
app: productpage
---
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: se-0
spec:
hosts:
- www.example.com
ports:
- number: 8080
protocol: HTTP
name: port-1
targetPort: 9080
resolution: DNS
---
apiVersion: v1
kind: Service
metadata:
name: productpage
spec:
selector:
app: productpage
ports:
- port: 9080
targetPort: 9080
name: http-0
I tried curl -H"Host:www.example.com" http://1.1.1.1:8080/
and received 503. After I removed the workloadSelector in the DestinationRule, I tried again and received 200.
In my configuration, the workloadSelector in DestinationRule shouldn't affect the route correctness of curl -H"Host:www.example.com" http://1.1.1.1:8080/
. So the behavior above is really confusing for me.
Version
$ istioctl version
client version: 1.20.0
control plane version: 1.20.0
data plane version: 1.20.0 (5 proxies)
$ kubectl version
Client Version: v1.28.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.3
Additional Information
No response