File tree Expand file tree Collapse file tree 2 files changed +99
-1
lines changed
Expand file tree Collapse file tree 2 files changed +99
-1
lines changed Original file line number Diff line number Diff line change 1+ #### 1. Create two differenct ConfigMap manifest with the follwing properties. If there are any bugs, fix them.
2+ ```
3+ Name: ConfigMap-A
4+ data 1:
5+ SALT: astdXy3Cmn5DMbcPqeYK
6+ STATE: present
7+
8+ Name: ConfigMap-B
9+ data 2:
10+ API: https://107.178.217.202
11+ USER: admin
12+ ```
13+
14+ #### 2. Complete the following Pod definition to use the above mentioned configMaps.
15+ ```
16+ apiVersion: v1
17+ kind: Pod
18+ metadata:
19+ name: config-test-pod
20+ spec:
21+ containers:
22+ - name: config-test-container
23+ image: k8s.gcr.io/busybox
24+ command: [ "/bin/sh", "-c", "echo $(SALT) $(STATE) $(API)" ]
25+ xxx:
26+ [...]
27+ restartPolicy: Never
28+ ```
29+
30+ #### 3. Convert the following data into secret.
31+ ```
32+ name: mongo-secret
33+ data:
34+ username: mongoadmin
35+ password: Cr0wnJ3w3!
36+ secret_key: AsMPgc3xTroPcv6vi$NO
37+ ```
38+
39+ #### 4. Mount the above created secret as a volume with the /etc/mongoCreds path in the following Pod manifest.
40+ ```
41+ apiVersion: v1
42+ kind: Pod
43+ metadata:
44+ name: secret-test-pod
45+ spec:
46+ containers:
47+ - name: secret-test-container
48+ image: k8s.gcr.io/busybox
49+ command: [ "/bin/sh", "-c", "ping" "localhost" ]
50+ ```
51+
52+ #### 5. Create a Secret from literal values using kubectl.
53+ ```
54+ username: casterAdmin
55+ password: s3cr3tsauc3
56+ ```
Original file line number Diff line number Diff line change 1- #### 1.
1+ #### 1. Create an Nginx Deployment using kubectl with following properties.
2+ ```
3+ 1. Name: nginx-frontend
4+ 2. Labels: app=nginx, tier=frontend
5+ 3. Image: nginx:latest
6+ 3. Replicas: 3
7+ 4. ImagePullPolicy: Always
8+ ```
9+
10+ #### 2. For the above mentioned Deployment, change the image version from ` nginx:latest ` to ` nginx:1.12.0 ` using ` kubectl set image ` command
11+
12+ #### 3. For the above mentioned Deployment, undo the changes using ` kubectl rollout ` command and rollback to revision 1.
13+
14+ #### 4. Create a Deployment manifest with the following properties and apply it. If it fails, try to do rolling update the image version to ` 0.3.0 `
15+ ```
16+ 1. Name: web-app
17+ 2. Labels: env=prod, tier=web
18+ 3. Image: robotshop/rs-web:v1.0
19+ 4. Port: 8080
20+ 5. Restart Policy: Always
21+ ```
22+
23+ #### 5. For the following application, fix and fill in the missing details.
24+ ```
25+ apiVersion: extensions/v1beta1
26+ kind: deployment
27+ metadata:
28+ labels:
29+ name: mysql
30+ spec:
31+ replicas: 1
32+ template:
33+ metadata:
34+ labels:
35+ app: mysql
36+ spec:
37+ containers:
38+ - image: robotshop/rs-mysql-db:latest
39+ name:
40+ ports:
41+ - Containerport: 3306
42+ restartPolicy: xxxx
43+ ```
You can’t perform that action at this time.
0 commit comments