Skip to content

Commit e0bc994

Browse files
committed
added extra content
1 parent 46aaebe commit e0bc994

File tree

4 files changed

+140
-0
lines changed

4 files changed

+140
-0
lines changed

exercises/140-ingress.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#### 1. Create a nginx ingress controller by following the documentation.
2+
`Reference`: [Nginx ingress](https://kubernetes.github.io/ingress-nginx/deploy/#generic-deployment)
3+
4+
#### 2. Use the nginx ingress to with the following properties for the deployment give below. Create the missing components to expose this deployment.
5+
```
6+
[ingress-details]
7+
ingress controller: nginx
8+
domain name: mogambo.com
9+
path: /
10+
service: frontend
11+
service port: 80
12+
```
13+
```
14+
[frontend-deployment]
15+
apiVersion: extensions/v1beta1
16+
kind: Deployment
17+
metadata:
18+
name: frontend
19+
spec:
20+
replicas: 2
21+
template:
22+
metadata:
23+
labels:
24+
app: front-end
25+
spec:
26+
containers:
27+
- image: schoolofdevops/frontend:latest
28+
imagePullPolicy: Always
29+
name: front-end
30+
ports:
31+
- containerPort: 8079
32+
protocol: TCP
33+
```
34+
35+
#### 3. Create a basic authentication for the frontend deployment with the following parameters with nginx ingress controller.
36+
```
37+
username: serviceadmin
38+
password: sup3rs3cr3t
39+
```

exercises/150-network-policies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#### 1. Create a network policy manifest which allows

exercises/170-rbac.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#### 1. Generate certificates for the follwoing user table
2+
| User | Group | Namespace | Resources | Access Types |
3+
|--:|--:|--:|--:|---|
4+
| Mike | Ops | all | all | get, list, watch, update, patch, create, delete, deletecollection |
5+
| Vitos | Test | test | all | get, list, watch, update, patch, create, delete |
6+
| Dimash | Dev | dev | all | get, list, watch |
7+
8+
#### 2. Create kubeconfig files and set contexts for the above mentioned table.
9+
10+
#### 3. Grant extra priviliges for the user `Dimash` to `get,list and watch` resources on `test` namespace.
11+
12+
#### 4. Create a cluster role with the following properties.
13+
```
14+
name: config-reader
15+
resources: configmaps
16+
verbs: get, watch and list
17+
```
18+
Create a Cluster Role Binding which allows user `Dave` to use this Cluster Role.

exercises/180-advancec-pod.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#### 1. In your Kubernetes cluster, Label one node with the label `frontend` and schedule the frontend deployment in the frontend node.
2+
```
3+
apiVersion: extensions/v1beta1
4+
kind: Deployment
5+
metadata:
6+
name: frontend
7+
spec:
8+
replicas: 3
9+
template:
10+
metadata:
11+
labels:
12+
app: frontend
13+
role: ui
14+
spec:
15+
containers:
16+
- image: schoolofdevops/frontend:latest
17+
imagePullPolicy: Always
18+
name: front-end
19+
ports:
20+
- containerPort: 8079
21+
protocol: TCP
22+
resources:
23+
requests:
24+
memory: "128Mi"
25+
cpu: "250m"
26+
limits:
27+
memory: "256Mi"
28+
cpu: "500m"
29+
[...]
30+
```
31+
32+
#### 2. Schedule the catalogue pods in the same node as frontend pod.
33+
```
34+
kind: Deployment
35+
metadata:
36+
name: catalogue
37+
labels:
38+
app: catalogue
39+
env: dev
40+
spec:
41+
replicas: 1
42+
selector:
43+
matchLabels:
44+
app: catalogue
45+
template:
46+
metadata:
47+
labels:
48+
app: catalogue
49+
env: dev
50+
spec:
51+
containers:
52+
- name: catalogue
53+
image: schoolofdevops/catalogue:v2
54+
imagePullPolicy: Always
55+
ports:
56+
- containerPort: 80
57+
```
58+
59+
#### 3. Make one of the node(ex. node 2) as unschedulable. Only carts pods should be schedulable on that node.
60+
```
61+
apiVersion: apps/v1beta1
62+
kind: Deployment
63+
metadata:
64+
name: carts
65+
labels:
66+
app: carts
67+
env: dev
68+
spec:
69+
replicas: 1
70+
template:
71+
metadata:
72+
labels:
73+
app: carts
74+
env: dev
75+
spec:
76+
containers:
77+
- name: carts
78+
image: schoolofdevops/carts
79+
imagePullPolicy: Always
80+
ports:
81+
- containerPort: 80
82+
```

0 commit comments

Comments
 (0)