Skip to content

Create K8s #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions k8s-specifications/K8s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

34 changes: 0 additions & 34 deletions k8s-specifications/db-deployment.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions k8s-specifications/db-service.yaml

This file was deleted.

34 changes: 34 additions & 0 deletions k8s-specifications/postgres-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-deploy
labels:
name: postgres-deploy
app: demo-voting-app
spec:
replicas: 1
selector:
matchLabels:
name: postgres-pod
app: demo-voting-app

template:
metadata:
name: postgres-pod
labels:
name: postgres-pod
app: demo-voting-app
spec:
containers:
- name: postgres
image: postgres
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: "postgres"
- name: POSTGRES_PASSWORD
value: "postgres"
- name: POSTGRES_HOST_AUTH_METHOD
value: trust

14 changes: 14 additions & 0 deletions k8s-specifications/postgres-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: db
labels:
name: postgres-service
app: demo-voting-app
spec:
ports:
- port: 5432
targetPort: 5432
selector:
name: postgres-pod
app: demo-voting-app
27 changes: 27 additions & 0 deletions k8s-specifications/redis-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-deploy
labels:
name: redis-deploy
app: demo-voting-app
spec:
replicas: 1
selector:
matchLabels:
name: redis-pod
app: demo-voting-app

template:
metadata:
name: redis-pod
labels:
name: redis-pod
app: demo-voting-app
spec:
containers:
- name: redis
image: redis
ports:
- containerPort: 6379

29 changes: 0 additions & 29 deletions k8s-specifications/redis-deployment.yaml

This file was deleted.

16 changes: 7 additions & 9 deletions k8s-specifications/redis-service.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: redis
name: redis
namespace: vote
labels:
name: redis-service
app: demo-voting-app
spec:
type: ClusterIP
ports:
- name: "redis-service"
port: 6379
targetPort: 6379
- port: 6379
targetPort: 6379
selector:
app: redis

name: redis-pod
app: demo-voting-app
27 changes: 27 additions & 0 deletions k8s-specifications/result-app-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: result-app-deploy
labels:
name: result-app-deploy
app: demo-voting-app
spec:
replicas: 1
selector:
matchLabels:
name: result-app-pod
app: demo-voting-app

template:
metadata:
name: result-app-pod
labels:
name: result-app-pod
app: demo-voting-app
spec:
containers:
- name: result-app
image: kodekloud/examplevotingapp_result:v1
ports:
- containerPort: 80

15 changes: 15 additions & 0 deletions k8s-specifications/result-app-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: result-service
labels:
name: result-service
app: demo-voting-app
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 80
selector:
name: result-app-pod
app: demo-voting-app
23 changes: 0 additions & 23 deletions k8s-specifications/result-deployment.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions k8s-specifications/result-service.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions k8s-specifications/vote-deployment.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions k8s-specifications/vote-service.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions k8s-specifications/voting-app-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: voting-app-deploy
labels:
name: voting-app-deploy
app: demo-voting-app
spec:
replicas: 1
selector:
matchLabels:
name: voting-app-pod
app: demo-voting-app

template:
metadata:
name: voting-app-pod
labels:
name: voting-app-pod
app: demo-voting-app
spec:
containers:
- name: voting-app
image: kodekloud/examplevotingapp_vote:v1
ports:
- containerPort: 80

15 changes: 15 additions & 0 deletions k8s-specifications/voting-app-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: voting-service
labels:
name: voting-service
app: demo-voting-app
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 80
selector:
name: voting-app-pod
app: demo-voting-app
25 changes: 25 additions & 0 deletions k8s-specifications/worker-app-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: worker-app-deploy
labels:
name: worker-app-deploy
app: demo-voting-app
spec:
replicas: 1
selector:
matchLabels:
name: worker-app-pod
app: demo-voting-app

template:
metadata:
name: worker-app-pod
labels:
name: worker-app-pod
app: demo-voting-app
spec:
containers:
- name: worker-app
image: kodekloud/examplevotingapp_worker:v1

Loading