Files
traefik-etcd-advertiser/assets/kubernetes.yml

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