forked from ntheanh201/kodekloud-engineer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
solution.yaml
45 lines (45 loc) · 817 Bytes
/
solution.yaml
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
38
39
40
41
42
43
44
45
apiVersion: v1
kind: Namespace
metadata:
name: httpd-namespace-xfusion
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpd-deployment-xfusion
labels:
app: httpd
namespace: httpd-namespace-xfusion
spec:
replicas: 2
selector:
matchLabels:
app: httpd
template:
metadata:
name: httpd
labels:
app: httpd
spec:
containers:
- name: httpd-container
image: httpd:latest
ports:
- containerPort: 8080
imagePullPolicy: IfNotPresent
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: httpd-service-xfusion
namespace: httpd-namespace-xfusion
spec:
selector:
app: httpd
ports:
- protocol: TCP
port: 80
targetPort: 80
nodePort: 30004
type: NodePort