idk i brought Istio and some other things
This commit is contained in:
1
istio_2/README.md
Normal file
1
istio_2/README.md
Normal file
@ -0,0 +1 @@
|
||||
https://istio.io/latest/docs/tasks/traffic-management/ingress/ingress-control/
|
43
istio_2/file.yaml
Normal file
43
istio_2/file.yaml
Normal file
@ -0,0 +1,43 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: httpbin
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: httpbin
|
||||
labels:
|
||||
app: httpbin
|
||||
service: httpbin
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8000
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: httpbin
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: httpbin
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: httpbin
|
||||
version: v1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: httpbin
|
||||
version: v1
|
||||
spec:
|
||||
serviceAccountName: httpbin
|
||||
containers:
|
||||
- image: docker.io/kennethreitz/httpbin
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: httpbin
|
||||
ports:
|
||||
- containerPort: 80
|
37
istio_2/file2.yaml
Normal file
37
istio_2/file2.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: httpbin-gateway
|
||||
spec:
|
||||
# The selector matches the ingress gateway pod labels.
|
||||
# If you installed Istio using Helm following the standard documentation, this would be "istio=ingress"
|
||||
selector:
|
||||
istio: ingressgateway
|
||||
servers:
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
hosts:
|
||||
- "httpbin.example.com"
|
||||
---
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: httpbin
|
||||
spec:
|
||||
hosts:
|
||||
- "httpbin.example.com"
|
||||
gateways:
|
||||
- httpbin-gateway
|
||||
http:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /status
|
||||
- uri:
|
||||
prefix: /delay
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8000
|
||||
host: httpbin
|
35
istio_2/tmp2.yaml
Normal file
35
istio_2/tmp2.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1beta1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: http
|
||||
namespace: default
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: gateway
|
||||
namespace: istio-ingress
|
||||
hostnames: ["httpbin.example.com"]
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /get
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /headers
|
||||
filters:
|
||||
- type: URLRewrite
|
||||
urlRewrite:
|
||||
# hostname: "*"
|
||||
hostname: elsewhere.example
|
||||
path:
|
||||
type: ReplacePrefixMatch
|
||||
# replacePrefixMatch: /
|
||||
replacePrefixMatch: /fennel
|
||||
# - type: RequestHeaderModifier
|
||||
# requestHeaderModifier:
|
||||
# add:
|
||||
# - name: my-added-header
|
||||
# value: added-value
|
||||
backendRefs:
|
||||
- name: httpbin
|
||||
port: 8000
|
Reference in New Issue
Block a user