initial commit
Change-Id: Ia748646eaf5c18f44eb5b147ff577d0d5ee844e8
This commit is contained in:
33
k8s-specifications/db-deployment.yaml
Normal file
33
k8s-specifications/db-deployment.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: db
|
||||
name: db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: db
|
||||
spec:
|
||||
containers:
|
||||
- image: postgres:15-alpine
|
||||
name: postgres
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: postgres
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: postgres
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: postgres
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: db-data
|
||||
volumes:
|
||||
- name: db-data
|
||||
emptyDir: {}
|
||||
15
k8s-specifications/db-service.yaml
Normal file
15
k8s-specifications/db-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: db
|
||||
name: db
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: "db-service"
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
selector:
|
||||
app: db
|
||||
|
||||
28
k8s-specifications/redis-deployment.yaml
Normal file
28
k8s-specifications/redis-deployment.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: redis:alpine
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: redis
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: redis-data
|
||||
volumes:
|
||||
- name: redis-data
|
||||
emptyDir: {}
|
||||
15
k8s-specifications/redis-service.yaml
Normal file
15
k8s-specifications/redis-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: "redis-service"
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
selector:
|
||||
app: redis
|
||||
|
||||
22
k8s-specifications/result-deployment.yaml
Normal file
22
k8s-specifications/result-deployment.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: result
|
||||
name: result
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: result
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: result
|
||||
spec:
|
||||
containers:
|
||||
- image: dockersamples/examplevotingapp_result
|
||||
name: result
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: result
|
||||
15
k8s-specifications/result-service.yaml
Normal file
15
k8s-specifications/result-service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: result
|
||||
name: result
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- name: "result-service"
|
||||
port: 8081
|
||||
targetPort: 80
|
||||
nodePort: 31001
|
||||
selector:
|
||||
app: result
|
||||
22
k8s-specifications/vote-deployment.yaml
Normal file
22
k8s-specifications/vote-deployment.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: vote
|
||||
name: vote
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vote
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vote
|
||||
spec:
|
||||
containers:
|
||||
- image: dockersamples/examplevotingapp_vote
|
||||
name: vote
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: vote
|
||||
16
k8s-specifications/vote-service.yaml
Normal file
16
k8s-specifications/vote-service.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: vote
|
||||
name: vote
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- name: "vote-service"
|
||||
port: 8080
|
||||
targetPort: 80
|
||||
nodePort: 31000
|
||||
selector:
|
||||
app: vote
|
||||
|
||||
19
k8s-specifications/worker-deployment.yaml
Normal file
19
k8s-specifications/worker-deployment.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: worker
|
||||
name: worker
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: worker
|
||||
spec:
|
||||
containers:
|
||||
- image: dockersamples/examplevotingapp_worker
|
||||
name: worker
|
||||
Reference in New Issue
Block a user