66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: bunkerized-nginx-ingress
|
|
labels:
|
|
bunkerized-nginx: "yes"
|
|
annotations:
|
|
# add any global and default environment variables here as annotations with the "bunkerized-nginx." prefix
|
|
# examples :
|
|
#bunkerized-nginx.AUTO_LETS_ENCRYPT: "yes"
|
|
#bunkerized-nginx.USE_ANTIBOT: "javascript"
|
|
#bunkerized-nginx.REDIRECT_HTTP_TO_HTTPS: "yes"
|
|
#bunkerized-nginx.app.example.com_REVERSE_PROXY_WS: "yes"
|
|
#bunkerized-nginx.app.example.com_USE_MODSECURITY: "no"
|
|
|
|
# add "static" routes here (see https://kubernetes.io/docs/concepts/services-networking/ingress/)
|
|
# and/or add annotations to your services (see https://github.com/bunkerity/bunkerized-nginx/tree/master/examples/kubernetes)
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- app.example.com
|
|
rules:
|
|
- host: "app.example.com"
|
|
http:
|
|
paths:
|
|
- pathType: Prefix
|
|
path: "/"
|
|
backend:
|
|
service:
|
|
name: myapp
|
|
port:
|
|
number: 80
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: myapp
|
|
labels:
|
|
app: myapp
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: myapp
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: myapp
|
|
spec:
|
|
containers:
|
|
- name: myapp
|
|
image: containous/whoami
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: myapp
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: myapp
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|