Skip to content

Commit

Permalink
feat: Deployment initiations (WeMakeDevs#83)
Browse files Browse the repository at this point in the history
* feat: Added Dockerfile

* feat: K8s config files added

* feat: Docker file architecture update

* feat: Docker file architecture update

* feat: Pod config file reverted back
  • Loading branch information
kaiwalyakoparkar authored Nov 8, 2022
1 parent ac1aff3 commit ad8a47f
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM --platform=linux/amd64 node:16-alpine
WORKDIR ./
COPY . .
EXPOSE 3000
CMD [ "npm", "start" ]
28 changes: 28 additions & 0 deletions kubernetes/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: commclassroom-deploy
namespace: default
spec:
## Set to 5 for start of lab
replicas: 5
selector:
matchLabels:
env: commclassroom
progressDeadlineSeconds: 300
minReadySeconds: 10
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
env: commclassroom
spec:
containers:
- name: commclassroom-ctr
image: kaiwalyakoparkar/commclassroom:1.0
ports:
- containerPort: 3000
22 changes: 22 additions & 0 deletions kubernetes/pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Pod
metadata:
name: commclassroom-pod
namespace: default
labels:
env: commclassroom
spec:
restartPolicy: OnFailure
containers:
- name: commclassroom-ctr
imagePullPolicy: Always
image: kaiwalyakoparkar/commclassroom:1.0
ports:
- containerPort: 3000
resources:
requests:
memory: "128Mi"
cpu: "500m"
limits:
memory: "512Mi"
cpu: "1000m"
11 changes: 11 additions & 0 deletions kubernetes/svc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: commclassroom
spec:
type: LoadBalancer
ports:
- port: 9000
targetPort: 3000
selector:
env: commclassroom

0 comments on commit ad8a47f

Please sign in to comment.