Skip to content

Commit

Permalink
add kubernetes file
Browse files Browse the repository at this point in the history
  • Loading branch information
agarwalhimanshugaya committed Jun 23, 2024
1 parent 70263eb commit b77e8d9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
22 changes: 22 additions & 0 deletions deployment-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
# Unique key of the Deployment instance
name: my-node-app
spec:
# 2 Pods should exist at all times.
replicas: 2
selector:
matchLabels:
app: node-app
template:
metadata:
labels:
# Apply this label to pods and default
# the Deployment label selector to this value
app: node-app
spec:
containers:
- name: node-app
# Run this image
image: #put your image name which you push in dockerhub
14 changes: 14 additions & 0 deletions service-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: service-my-node-app
spec:
ports:
- name: http
port: 8080
targetPort: 3000
selector:
# Loadbalance traffic across Pods matching
# this label selector
app: node-app
type: LoadBalancer

0 comments on commit b77e8d9

Please sign in to comment.