Skip to content

Commit 472942a

Browse files
committed
add mock questions + others
1 parent 1349fbe commit 472942a

File tree

8 files changed

+95
-0
lines changed

8 files changed

+95
-0
lines changed

1-Basics/practice-questions.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Practice questions
2+
3+
Create a pod from the image nginx
4+
5+
```sh
6+
7+
kubectl run nginx --image=nginx
8+
9+
```
10+
11+
Create a pod from the image nginx with the yaml spec and do not apply it (hint : use dry-run)
12+
13+
```sh
14+
15+
kubectl run nginx --image=nginx --dry-run=client -o yaml > pod.yaml
16+
17+
```
18+
19+
Deploy a pod named pod-test using the image nginx:1.2-alpine
20+
21+
```sh
22+
23+
kubectl run pod-test --image=nginx:1.2-alpine
24+
25+
```
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Practice questions
2+
3+
A pod named memcached has already been created.
4+
5+
Create a service called "service1" to expose the pod through a service at the cluster level on port 6379.
6+
7+
```sh
8+
9+
kubectl expose po memcached --name=service1 --port=6379 --target-port=6379
10+
11+
```

4-Workloads-Scheduling/useful-commands

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
##
2+
3+
```sh
4+
5+
6+
7+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Practice questions
2+
3+
A pod named memcached has already been created.
4+
5+
Create a service called "service1" to expose the pod through a service at the cluster level on port 6379.
6+
7+
```sh
8+
9+
kubectl expose po memcached --name=service1 --port=6379 --target-port=6379
10+
11+
```

7-mock-exam-questions/layout.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Question
2+
3+
4+
```sh
5+
6+
7+
8+
```

7-mock-exam-questions/q1.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Question 1 - Perform an ETCD backup
2+
3+
4+
```sh
5+
6+
ETCDCTL_API=3 etcdctl \
7+
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
8+
--cert=/etc/kubernetes/pki/apiserver-etcd-client.crt \
9+
--key=/etc/kubernetes/pki/apiserver-etcd-client.key snapshot save <destination>
10+
11+
```
12+

7-mock-exam-questions/q2.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Question 1 - Scaling deployment
2+
3+
There's a running deployment called "test" that has only 1 pod running. Scale the deployment to 5 replicas.
4+
5+
```sh
6+
7+
kubectl scale deployment test --replicas=5
8+
9+
```
10+
11+
Verify that its running now
12+
13+
14+
```sh
15+
16+
kubectl get deploy test
17+
18+
kubectl get po
19+
20+
```

0 commit comments

Comments
 (0)