61 lines
1.0 KiB
YAML
61 lines
1.0 KiB
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: soo-nginx-istio
|
|
labels:
|
|
app: soo-nginx-istio
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx
|
|
ports:
|
|
- containerPort: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: soo-nginx-istio
|
|
spec:
|
|
selector:
|
|
app: soo-nginx-istio
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: networking.istio.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: soo-nginx-gateway
|
|
namespace: default
|
|
spec:
|
|
selector:
|
|
istio: ingressgateway # istio-ingressgateway의 label과 일치해야 함
|
|
servers:
|
|
- port:
|
|
number: 80
|
|
name: http
|
|
protocol: HTTP
|
|
hosts:
|
|
- "soo-nginx-istio.test"
|
|
---
|
|
apiVersion: networking.istio.io/v1beta1
|
|
kind: VirtualService
|
|
metadata:
|
|
name: soo-nginx-vs
|
|
namespace: default
|
|
spec:
|
|
hosts:
|
|
- "soo-nginx-istio.test"
|
|
gateways:
|
|
- soo-nginx-gateway
|
|
http:
|
|
- match:
|
|
- uri:
|
|
prefix: /
|
|
route:
|
|
- destination:
|
|
host: soo-nginx-istio
|
|
port:
|
|
number: 80
|