mirror of
https://codeberg.org/27/inception-of-things.git
synced 2025-10-14 02:54:45 +02:00
「🏗️」 wip: finished the script for deployment
This commit is contained in:
22
p2/confs/app1/deployment.yml
Normal file
22
p2/confs/app1/deployment.yml
Normal file
@ -0,0 +1,22 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: app1-deployment
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: app1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: app1
|
||||
spec:
|
||||
containers:
|
||||
- name: app1
|
||||
image: ghcr.io/traefik/whoami:v1.11
|
||||
ports:
|
||||
- containerPort: 80
|
||||
command:
|
||||
- /whoami
|
||||
- --port=80
|
||||
- --name=app-one
|
11
p2/confs/app1/service.yml
Normal file
11
p2/confs/app1/service.yml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: app1-service
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: app1
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
23
p2/confs/app2/deployment.yml
Normal file
23
p2/confs/app2/deployment.yml
Normal file
@ -0,0 +1,23 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: app2-deployment
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: app2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: app2
|
||||
spec:
|
||||
containers:
|
||||
- name: app2
|
||||
image: ghcr.io/traefik/whoami:v1.11
|
||||
ports:
|
||||
- containerPort: 80
|
||||
command:
|
||||
- /whoami
|
||||
- --port=80
|
||||
- --name=app-two
|
11
p2/confs/app2/service.yml
Normal file
11
p2/confs/app2/service.yml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: app2-service
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: app2
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
22
p2/confs/app3/deployment.yml
Normal file
22
p2/confs/app3/deployment.yml
Normal file
@ -0,0 +1,22 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: app3-deployment
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: app3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: app3
|
||||
spec:
|
||||
containers:
|
||||
- name: app3
|
||||
image: ghcr.io/traefik/whoami:v1.11
|
||||
ports:
|
||||
- containerPort: 80
|
||||
command:
|
||||
- /whoami
|
||||
- --port=80
|
||||
- --name=app-three
|
11
p2/confs/app3/service.yml
Normal file
11
p2/confs/app3/service.yml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: app3-service
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: app3
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
36
p2/confs/ingress.yml
Normal file
36
p2/confs/ingress.yml
Normal file
@ -0,0 +1,36 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: app-ingress
|
||||
spec:
|
||||
rules:
|
||||
- host: app1.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: app1-service
|
||||
port:
|
||||
number: 80
|
||||
- host: app2.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: app2-service
|
||||
port:
|
||||
number: 80
|
||||
- host: app3.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: app3-service
|
||||
port:
|
||||
number: 80
|
Reference in New Issue
Block a user