forked from Siddeshg672/hello_world_public_war
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-deployment.yaml
More file actions
37 lines (37 loc) · 815 Bytes
/
app-deployment.yaml
File metadata and controls
37 lines (37 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
type: NodePort
selector:
app.kubernetes.io/app: devopsapp
ports:
# By default and for convenience, the `targetPort` is set to the same value as the `port` field.
- port: 80
targetPort: 80
# Optional field
# By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767)
#nodePort: 30007
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: devopsapp-deployment
labels:
app: devopsapp
spec:
replicas: 1
selector:
matchLabels:
app: devopsapp
template:
metadata:
labels:
app: devopsapp
spec:
containers:
- name: devopsapp
image: nginx:latest
ports:
- containerPort: 80