Skip to content

Commit e2270bf

Browse files
committed
added scenarios for Pods section
1 parent 057811a commit e2270bf

File tree

3 files changed

+73
-19
lines changed

3 files changed

+73
-19
lines changed

exercises/10-pods.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,75 @@ spec:
105105
```
106106
kubeclt exec -it web -sh -c synch
107107
```
108+
109+
#### 8. Try to apply the following manifest. If fails, try to debug.
110+
```
111+
apiVersion: v1
112+
kind: Pod
113+
metadata:
114+
name: web
115+
labels:
116+
app:
117+
role: role
118+
spec:
119+
containers:
120+
- name: web
121+
image: robotshop/rs-web:latest
122+
ports:
123+
- containerPort: 8080
124+
protocol: TCP
125+
```
126+
127+
#### 9. Fix the following manifest. Don't apply it. Just fix it by reading.
128+
```
129+
apiVersion: v1
130+
kind: pod
131+
metadata:
132+
name: web
133+
labels:
134+
role: role
135+
spec:
136+
containers:
137+
- name: web
138+
image: robotshop/rs-web:latest
139+
ports:
140+
- containerport: 8080
141+
protocol: TCP
142+
```
143+
144+
#### 10. Mount `/var/www/html` from Pod using the follwing manifest. Fill the missing fields.
145+
```
146+
apiVersion: v1
147+
kind: Pod
148+
metadata:
149+
name: web
150+
labels:
151+
role: role
152+
spec:
153+
containers:
154+
- name: web
155+
image: robotshop/rs-web:latest
156+
ports:
157+
- containerPort: 8080
158+
protocol: TCP
159+
volumes:
160+
- name: roboshop-storage
161+
emptyDir: {}
162+
```
163+
164+
#### 11. Write a Pod manifest with the image nginx which has a volume that mounts /etc/nginx/ directory. Use "hostPath" volume type.
165+
```
166+
apiVersion: v1
167+
kind: Pod
168+
metadata:
169+
name: nginx
170+
spec:
171+
containers:
172+
- image: nginx
173+
name: nginx
174+
ports:
175+
- containerPort: 80
176+
volumeMounts:
177+
xxx
178+
```
179+
`Reference`: [Volumes](https://kubernetes.io/docs/concepts/storage/volumes/)

exercises/20-volumes.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

exercises/xx-probable.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1. Attaching secrets as volumes in Pod.

0 commit comments

Comments
 (0)