forked from AhmadRafiee/Kubernetes_training_with_DockerMe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
02_pod.yml
45 lines (45 loc) · 918 Bytes
/
02_pod.yml
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: Pod
metadata:
name: multi-container-pod
labels:
app: multi-container-pod
svc: example
spec:
volumes:
- name: html
emptyDir: {}
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
volumeMounts:
- name: html
mountPath: /usr/share/nginx/html
resources:
requests:
memory: 20Mi
cpu: 30m
limits:
memory: 50Mi
cpu: 30m
- name: date
image: debian
volumeMounts:
- name: html
mountPath: /html
command: ["/bin/sh", "-c"]
args:
- while true; do
date > /html/index.html.tmp;
mv /html/index.html.tmp /html/index.html;
sleep 1;
done
resources:
requests:
memory: 15Mi
cpu: 10m
limits:
memory: 15Mi
cpu: 10m