kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch15/todo-list/update/ingress-https.yaml

69 lines
1.4 KiB
YAML

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo-new
labels:
kiamol: ch15
annotations:
nginx.ingress.kubernetes.io/affinity: cookie
spec:
rules:
- host: todo.kiamol.local
http:
paths:
- pathType: Exact
path: /new
backend:
serviceName: todo-web
servicePort: 80
tls:
- secretName: kiamol-cert
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo-static
labels:
kiamol: ch15
annotations:
nginx.ingress.kubernetes.io/proxy-buffering: "on"
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_cache static-cache;
proxy_cache_valid 60m;
add_header X-Cache $upstream_cache_status;
spec:
rules:
- host: todo.kiamol.local
http:
paths:
- pathType: Prefix
path: /static
backend:
serviceName: todo-web
servicePort: 80
tls:
- secretName: kiamol-cert
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo
labels:
kiamol: ch15
spec:
rules:
- host: todo.kiamol.local
http:
paths:
- pathType: Exact
path: /
backend:
serviceName: todo-web
servicePort: 80
- pathType: Exact
path: /list
backend:
serviceName: todo-web
servicePort: 80
tls:
- secretName: kiamol-cert