96 lines
1.3 KiB
YAML
96 lines
1.3 KiB
YAML
---
|
|
kind: Endpoints
|
|
apiVersion: v1
|
|
metadata:
|
|
name: whoami4
|
|
namespace: default
|
|
|
|
subsets:
|
|
- addresses:
|
|
- ip: 10.10.0.1
|
|
- ip: 10.10.0.2
|
|
ports:
|
|
- name: web
|
|
port: 8080
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: whoami4
|
|
namespace: default
|
|
|
|
spec:
|
|
ports:
|
|
- name: web
|
|
port: 8080
|
|
selector:
|
|
app: traefiklabs
|
|
task: whoami4
|
|
|
|
------
|
|
kind: Endpoints
|
|
apiVersion: v1
|
|
metadata:
|
|
name: whoami5
|
|
namespace: default
|
|
|
|
subsets:
|
|
- addresses:
|
|
- ip: 10.10.0.3
|
|
- ip: 10.10.0.4
|
|
ports:
|
|
- name: web
|
|
port: 8080
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: whoami5
|
|
namespace: default
|
|
|
|
spec:
|
|
ports:
|
|
- name: web
|
|
port: 8080
|
|
selector:
|
|
app: traefiklabs
|
|
task: whoami5
|
|
|
|
---
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
kind: TraefikService
|
|
metadata:
|
|
name: mirror1
|
|
namespace: default
|
|
|
|
spec:
|
|
mirroring:
|
|
name: whoami5
|
|
kind: Service
|
|
port: 8080
|
|
mirrors:
|
|
- name: whoami4
|
|
kind: Service
|
|
percent: 50
|
|
port: 8080
|
|
|
|
---
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: test.route
|
|
namespace: default
|
|
|
|
spec:
|
|
entryPoints:
|
|
- web
|
|
|
|
routes:
|
|
- match: Host(`foo.com`) && PathPrefix(`/foo`)
|
|
kind: Rule
|
|
priority: 12
|
|
services:
|
|
- name: mirror1
|
|
kind: TraefikService
|