kubectl exec -it sleep-68648fd5b5-p6hsc -c sleep -- sh
Last active
December 27, 2018 11:13
-
-
Save yangl/6cf19774c00711a628f9857d8fb5d1ba to your computer and use it in GitHub Desktop.
Istio访问集群多个外部服务,可以使用istio sleep那个pod进去发送curl验证 https://preliminary.istio.io/zh/docs/tasks/traffic-management/egress/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: ServiceEntry | |
metadata: | |
name: http-cnn | |
spec: | |
hosts: | |
- ifeve.com | |
- xxfox.perfma.com | |
ports: | |
- number: 80 | |
name: http | |
protocol: HTTP | |
resolution: DNS | |
location: MESH_EXTERNAL | |
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: ServiceEntry | |
metadata: | |
name: https-cn | |
spec: | |
hosts: | |
- github.com | |
- edition.cnn.com | |
ports: | |
- number: 443 | |
name: https | |
protocol: HTTPS | |
resolution: DNS | |
location: MESH_EXTERNAL | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: https-cn | |
spec: | |
hosts: | |
- github.com | |
- edition.cnn.com | |
tls: | |
- match: | |
- port: 443 | |
sni_hosts: | |
- github.com | |
route: | |
- destination: | |
host: github.com | |
port: | |
number: 443 | |
weight: 100 | |
- match: | |
- port: 443 | |
sni_hosts: | |
- edition.cnn.com | |
route: | |
- destination: | |
host: edition.cnn.com | |
port: | |
number: 443 | |
weight: 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment