mirror of
https://github.com/wardviaene/kubernetes-course.git
synced 2026-05-06 00:06:33 +00:00
istio egress
This commit is contained in:
@@ -80,3 +80,9 @@ Create pods, services, destinationrules, virtualservices
|
||||
kubectl create -f <(istioctl kube-inject -f helloworld-tls.yaml)
|
||||
kubectl create -f helloworld-legacy.yaml
|
||||
```
|
||||
|
||||
### End-user authentication
|
||||
```
|
||||
kubectl create -f <(istioctl kube-inject -f helloworld-jwt.yaml)
|
||||
kubectl create -f helloworld-jwt-enable.yaml
|
||||
```
|
||||
|
||||
52
istio/external-service.yaml
Normal file
52
istio/external-service.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# http
|
||||
#
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: ServiceEntry
|
||||
metadata:
|
||||
name: ifconfig-co-http
|
||||
spec:
|
||||
hosts:
|
||||
- ifconfig.co
|
||||
ports:
|
||||
- number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
resolution: DNS
|
||||
location: MESH_EXTERNAL
|
||||
---
|
||||
#
|
||||
# https
|
||||
#
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: ServiceEntry
|
||||
metadata:
|
||||
name: ifconfig-co-https
|
||||
spec:
|
||||
hosts:
|
||||
- ifconfig.co
|
||||
ports:
|
||||
- number: 443
|
||||
name: https
|
||||
protocol: HTTPS
|
||||
resolution: DNS
|
||||
location: MESH_EXTERNAL
|
||||
---
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: ifconfig-co
|
||||
spec:
|
||||
hosts:
|
||||
- ifconfig.co
|
||||
tls:
|
||||
- match:
|
||||
- port: 443
|
||||
sni_hosts:
|
||||
- ifconfig.co
|
||||
route:
|
||||
- destination:
|
||||
host: ifconfig.co
|
||||
port:
|
||||
number: 443
|
||||
weight: 100
|
||||
Reference in New Issue
Block a user