99 lines
1.5 KiB
YAML
Executable File
99 lines
1.5 KiB
YAML
Executable File
# Example of a Ingress "LB" that itterates between 3 instances
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nginxo-deploayment
|
|
labels:
|
|
environment: testin-lb1s
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
applicasao: webpaggo
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
applicasao: webpaggo
|
|
spec:
|
|
containers:
|
|
- name: nginxo
|
|
image: nginx
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: whoami-traefik
|
|
labels:
|
|
environment: testin-lb1
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
applicasao: webpaggo
|
|
replicas: 2
|
|
template:
|
|
metadata:
|
|
labels:
|
|
applicasao: webpaggo
|
|
spec:
|
|
containers:
|
|
- name: whoami
|
|
image: traefik/whoami
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: httpago-deployment
|
|
labels:
|
|
environment: testin-lb1
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
applicasao: webpaggo
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
applicasao: webpaggo
|
|
spec:
|
|
containers:
|
|
- name: apache
|
|
image: httpd
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ingressito
|
|
labels:
|
|
environment: testin-lb1
|
|
spec:
|
|
selector:
|
|
applicasao: webpaggo
|
|
ports:
|
|
- port: 80
|
|
targetPort: http
|
|
externalTrafficPolicy: Local
|
|
type: LoadBalancer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|