Skip to content

Commit 03385a1

Browse files
authored
Create deployment.yaml
1 parent 49cff08 commit 03385a1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

deployment.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: your-app-name
5+
labels:
6+
app: your-app-name
7+
spec:
8+
replicas: 2
9+
selector:
10+
matchLabels:
11+
app: your-app-name
12+
template:
13+
metadata:
14+
labels:
15+
app: your-app-name
16+
spec:
17+
containers:
18+
- name: your-app-name
19+
image: your-docker-registry-url/your-image-name:latest # Replace with your registry URL and image name
20+
ports:
21+
- containerPort: 80
22+
---
23+
apiVersion: v1
24+
kind: Service
25+
metadata:
26+
name: your-app-service
27+
spec:
28+
selector:
29+
app: your-app-name
30+
ports:
31+
- protocol: TCP
32+
port: 80
33+
targetPort: 80
34+
type: LoadBalancer # Or use "NodePort" based on your requirement

0 commit comments

Comments
 (0)