-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment-pod.yaml
More file actions
39 lines (39 loc) · 850 Bytes
/
deployment-pod.yaml
File metadata and controls
39 lines (39 loc) · 850 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
38
39
# Create Namespace
apiVersion: v1
kind: Namespace
metadata:
name: deployment-pod-namespace
---
# Create Deployment with 2 Replicas Pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment-pod-app
namespace: deployment-pod-namespace
spec:
selector:
matchLabels:
pod-type: deployment-pod
app-name: deploy
replicas: 2
template:
metadata:
labels:
pod-type: deployment-pod
app-name: deploy
spec:
containers:
- name: app
image: alpine
command: ["sleep", "3600"]
resources:
limits:
memory: "100Mi"
cpu: "100m"
requests:
memory: "50Mi"
cpu: "50m"
ports:
- containerPort: 8080
imagePullPolicy: IfNotPresent
restartPolicy: Always