Skip to content

Commit 31358ff

Browse files
authored
Add files via upload
1 parent f2f7879 commit 31358ff

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

deployment/deployment.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: java-app-k8s-deploy
5+
spec:
6+
replicas: 2 # Adjust the number of replicas as needed
7+
selector:
8+
matchLabels:
9+
app: java-app
10+
template:
11+
metadata:
12+
labels:
13+
app: java-app
14+
spec:
15+
containers:
16+
- name: java-app
17+
image: 887905533173.dkr.ecr.ap-south-1.amazonaws.com/ravik:javamulti
18+
imagePullPolicy: IfNotPresent
19+
ports:
20+
- containerPort: 8080
21+
---
22+
apiVersion: v1
23+
kind: Service
24+
metadata:
25+
name: java-app-service
26+
spec:
27+
selector:
28+
app: java-app
29+
ports:
30+
- protocol: TCP
31+
port: 80
32+
targetPort: 8080
33+
type: NodePort # Change to NodePort or ClusterIP if needed

0 commit comments

Comments
 (0)