Skip to content

Commit 46aaebe

Browse files
committed
added pv, release strategies and hpa
1 parent 4755b38 commit 46aaebe

File tree

3 files changed

+105
-0
lines changed

3 files changed

+105
-0
lines changed

exercises/110-pv.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#### 1. Create a Storage Class manifest with the following properties.
2+
```
3+
name: gke
4+
provisioner: kubernetes.io/gce-pd
5+
type: pd-ssd
6+
zones: us-central1-a
7+
```
8+
9+
#### 2. Fix and complete the following PVC manifest.
10+
```
11+
kind: persistentVolumeClaim
12+
apiVersion: v1beta1
13+
metadata:
14+
name: jenkins-data
15+
annotations:
16+
volume.beta.kubernetes.io/storage-class: gke
17+
spec:
18+
accessMode:
19+
- ReadWriteMany
20+
xxx:
21+
storage: 10Gi
22+
```
23+
24+
#### 3. Convert the following Deployment to use the above created PVC.
25+
```
26+
apiVersion: apps/v1beta1
27+
kind: Deployment
28+
metadata:
29+
name: jenkins
30+
labels:
31+
app: jenkins
32+
tier: platform
33+
environment: dev
34+
spec:
35+
replicas: 1
36+
template:
37+
metadata:
38+
labels:
39+
app: jenkins
40+
tier: platform
41+
environment: dev
42+
spec:
43+
containers:
44+
- name: jenkins
45+
image: jenkins
46+
ports:
47+
- containerPort: 8080
48+
- containerPort: 50000
49+
volumeMounts:
50+
- name: jenkins
51+
mountPath: /var/lib/jenkins
52+
[xxx]:
53+
- yyy
54+
securityContext:
55+
fsGroup: 1000
56+
```

exercises/120-release-strategy.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#### 1. Create a Deployment manifest which uses `Recreate` as its deployment strategy with the following properties.
2+
```
3+
Name: mogambo
4+
Replicas: 3
5+
Image: schoolofdevops/frontend:latest
6+
```
7+
8+
#### 2. Create a Deployment with version 1 of the image and then do a rolling update to version 2.
9+
```
10+
Image Version 1: schoolofdevops/frontend:v1.0
11+
Image Version 2: schoolofdevops/frontend:v2.0
12+
maxUnavailable pods should be 1.
13+
maxSurge should be 2.
14+
```
15+
16+
#### 3. Convert the above created Deployment manifest with Blue/Green strategy.
17+
```
18+
Version 1: Blue
19+
Version 2: Green
20+
```
21+

exercises/130-hpa.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#### 1. When you deploy the metrics server, you are not able to get metrics either from Pods or Nodes. After debugging further, you found out that the metrics-server Pods is not running with following error. How would you go about fixing this issue?
2+
```
3+
[metrics-server-logs]
4+
I0919 11:06:38.614962 1 serving.go:273] Generated self-signed cert (apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
5+
[restful] 2018/09/19 11:06:39 log.go:33: [restful/swagger] listing is available at https://:443/swaggerapi
6+
[restful] 2018/09/19 11:06:39 log.go:33: [restful/swagger] https://:443/swaggerui/ is mapped to folder /swagger-ui/
7+
I0919 11:06:39.698970 1 serve.go:96] Serving securely on [::]:443
8+
E0919 11:06:50.112929 1 reststorage.go:101] unable to fetch node metrics for node "kubeadm-test": no metrics known for node "kubeadm-test"
9+
E0919 11:06:50.112964 1 reststorage.go:101] unable to fetch node metrics for node "kubeadm-test-2": no metrics known for node "kubeadm-test-2"
10+
E0919 11:06:52.638381 1 reststorage.go:101] unable to fetch node metrics for node "kubeadm-test": no metrics known for node "kubeadm-test"
11+
E0919 11:06:52.638404 1 reststorage.go:101] unable to fetch node metrics for node "kubeadm-test-2": no metrics known for node "kubeadm-test-2"
12+
E0919 11:07:39.693561 1 manager.go:102] unable to fully collect metrics: [unable to fully scrape metrics from source kubelet_summary:kubeadm-test: unable to fetch metrics from Kubelet kubeadm-test (kubeadm-test): Get https://kubeadm-test:10250/stats/summary/: x509: certificate signed by unknown authority, unable to fully scrape metrics from source kubelet_summary:kubeadm-test-2: unable to fetch metrics from Kubelet kubeadm-test-2 (kubeadm-test-2): Get https://kubeadm-test-2:10250/stats/summary/: x509: certificate signed by unknown authority]
13+
```
14+
15+
#### 2. Create a Deployment manifest with following properties.
16+
```
17+
image: schoolofdevops/frontend:v1.0
18+
minimum available memory: 128mb
19+
minimum available cpu: 0.25 core
20+
maximum available memory: 256mb
21+
maximum available cpu: 0.50 core
22+
```
23+
24+
#### 3. Create a HPA for the above created Deployment with following propeties.
25+
```
26+
cpu target utilization: 50%
27+
memory target utiliztion: 200mb
28+
```

0 commit comments

Comments
 (0)