This commit is contained in:
2024-02-20 17:15:27 +08:00
committed by huty
parent 6706e1a633
commit 34158042ad
1529 changed files with 177765 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
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
- pathType: Exact
path: /new
backend:
serviceName: todo-web
servicePort: 80
- pathType: Prefix
path: /static
backend:
serviceName: todo-web
servicePort: 80

View File

@@ -0,0 +1,69 @@
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

View File

@@ -0,0 +1,57 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo-new
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
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo-static
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
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo
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

View File

@@ -0,0 +1,66 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2-new
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: Path
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/router.tls.certresolver: default
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /new
backend:
serviceName: todo-web-sticky
servicePort: 80
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2-static
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: PathPrefix
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/router.tls.certresolver: default
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /static
backend:
serviceName: todo-web
servicePort: 80
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: Path
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/router.tls.certresolver: default
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /
backend:
serviceName: todo-web
servicePort: 80
- path: /list
backend:
serviceName: todo-web
servicePort: 80

View File

@@ -0,0 +1,69 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2-new
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: Path
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /new
backend:
serviceName: todo-web-sticky
servicePort: 80
tls:
- secretName: kiamol-cert
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2-static
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: PathPrefix
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /static
backend:
serviceName: todo-web
servicePort: 80
tls:
- secretName: kiamol-cert
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: Path
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /
backend:
serviceName: todo-web
servicePort: 80
- path: /list
backend:
serviceName: todo-web
servicePort: 80
tls:
- secretName: kiamol-cert

View File

@@ -0,0 +1,76 @@
apiVersion: v1
kind: Service
metadata:
name: todo-web-sticky
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
spec:
ports:
- port: 80
targetPort: 80
selector:
app: todo-web
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2-new
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: Path
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /new
backend:
serviceName: todo-web-sticky
servicePort: 80
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2-static
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: PathPrefix
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /static
backend:
serviceName: todo-web
servicePort: 80
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: todo2
labels:
kiamol: ch15
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.pathmatcher: Path
spec:
rules:
- host: todo2.kiamol.local
http:
paths:
- path: /
backend:
serviceName: todo-web
servicePort: 80
- path: /list
backend:
serviceName: todo-web
servicePort: 80