Skip to content

Instantly share code, notes, and snippets.

@marcelo-ochoa
Created June 22, 2021 13:49
Show Gist options
  • Save marcelo-ochoa/0bd7ef11ed88d555f8fa8f8e2221f7ef to your computer and use it in GitHub Desktop.
Save marcelo-ochoa/0bd7ef11ed88d555f8fa8f8e2221f7ef to your computer and use it in GitHub Desktop.
WhoAmi Traefik App for testing
# whoami.yaml
kind: Deployment
apiVersion: apps/v1
metadata:
name: app-v1
spec:
replicas: 1
selector:
matchLabels:
app: app-v1
template:
metadata:
labels:
app: app-v1
spec:
containers:
- name: app-v1
image: containous/whoami:v1.5.0
---
apiVersion: v1
kind: Service
metadata:
name: app-v1
labels:
app: app-v1
spec:
type: ClusterIP
ports:
- port: 80
name: app-v1
selector:
app: app-v1
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: app
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- host: whoami-oci.hopto.org
http:
paths:
- backend:
serviceName: app-v1
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment