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,36 @@
apiVersion: v1
kind: Service
metadata:
name: apod-api
labels:
kiamol: ch16
spec:
ports:
- port: 80
targetPort: api
selector:
app: apod-api
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: apod-api
labels:
kiamol: ch16
spec:
selector:
matchLabels:
app: apod-api
template:
metadata:
labels:
app: apod-api
spec:
containers:
- name: api
image: kiamol/ch14-image-of-the-day
ports:
- containerPort: 80
name: api

View File

@@ -0,0 +1,36 @@
apiVersion: v1
kind: Service
metadata:
name: apod-log
labels:
kiamol: ch16
spec:
ports:
- port: 80
targetPort: api
selector:
app: apod-log
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: apod-log
labels:
kiamol: ch16
spec:
selector:
matchLabels:
app: apod-log
template:
metadata:
labels:
app: apod-log
spec:
containers:
- name: api
image: kiamol/ch14-access-log
ports:
- containerPort: 80
name: api

View File

@@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: apod-api
labels:
kiamol: ch16
spec:
podSelector:
matchLabels:
app: apod-api
ingress:
- from:
- podSelector:
matchLabels:
app: apod-web
ports:
- port: api

View File

@@ -0,0 +1,35 @@
apiVersion: v1
kind: Service
metadata:
name: apod-web
labels:
kiamol: ch16
spec:
ports:
- port: 8016
targetPort: web
selector:
app: apod-web
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: apod-web
labels:
kiamol: ch16
spec:
selector:
matchLabels:
app: apod-web
template:
metadata:
labels:
app: apod-web
spec:
containers:
- name: web
image: kiamol/ch14-image-gallery
ports:
- containerPort: 80
name: web