53 lines
987 B
YAML
53 lines
987 B
YAML
---
|
|
# https://opensource.com/article/20/3/kubernetes-traefik
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mysite-cyberchef
|
|
labels:
|
|
app: mysite-cyberchef
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: mysite-cyberchef
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mysite-cyberchef
|
|
spec:
|
|
containers:
|
|
- name: cyberchef
|
|
image: mpepping/cyberchef
|
|
ports:
|
|
- containerPort: 8000
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mysite-cyberchef-service
|
|
spec:
|
|
selector:
|
|
app: mysite-cyberchef
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8000
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: mysite-cyberchef-ingress
|
|
annotations:
|
|
kubernetes.io/ingress.class: "traefik"
|
|
spec:
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: mysite-cyberchef-service
|
|
port:
|
|
number: 80
|