mirror of
https://github.com/KevinMidboe/traefik-etcd-advertiser.git
synced 2025-10-29 18:00:19 +00:00
43 lines
886 B
YAML
43 lines
886 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: example-webapp
|
|
labels:
|
|
app: example-webapp
|
|
annotations:
|
|
traefik.ingress.kubernetes.io/router.entrypoints: "web"
|
|
traefik.ingress.kubernetes.io/router.rule: "Host(`example.com`)"
|
|
spec:
|
|
selector:
|
|
app: example-webapp
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: example-webapp
|
|
labels:
|
|
app: example-webapp
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: example-webapp
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: example-webapp
|
|
annotations:
|
|
traefik.ingress.kubernetes.io/router.entrypoints: "web"
|
|
traefik.ingress.kubernetes.io/router.rule: "Host(`example.com`)"
|
|
spec:
|
|
containers:
|
|
- name: webapp
|
|
image: nginx:latest
|
|
ports:
|
|
- containerPort: 80
|