Add system design notebook image
As well as two Kubernetes basic exercises.
This commit is contained in:
11
exercises/kubernetes/pods_01.md
Normal file
11
exercises/kubernetes/pods_01.md
Normal file
@ -0,0 +1,11 @@
|
||||
## Pods 01
|
||||
|
||||
#### Objective
|
||||
|
||||
Learn how to create pods
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. Choose a container image (e.g. redis, nginx, mongo, etc.)
|
||||
2. Create a pod (in the default namespace) using the image you chose
|
||||
3. Verify the pod is running
|
11
exercises/kubernetes/services_01.md
Normal file
11
exercises/kubernetes/services_01.md
Normal file
@ -0,0 +1,11 @@
|
||||
## Services 01
|
||||
|
||||
#### Objective
|
||||
|
||||
Learn how to create services
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. Create a pod running ngnix
|
||||
2. Create a service for the pod you've just created
|
||||
3. Verify the app is reachable
|
6
exercises/kubernetes/solutions/pods_01_solution.md
Normal file
6
exercises/kubernetes/solutions/pods_01_solution.md
Normal file
@ -0,0 +1,6 @@
|
||||
## Pods 01 - Solution
|
||||
|
||||
```
|
||||
kubectl run nginx --image=nginx --restart=Never
|
||||
kubectl get pods
|
||||
```
|
19
exercises/kubernetes/solutions/services_01_solution.md
Normal file
19
exercises/kubernetes/solutions/services_01_solution.md
Normal file
@ -0,0 +1,19 @@
|
||||
## Services 01 - Solution
|
||||
|
||||
```
|
||||
kubectl run nginx --image=nginx --restart=Never --port=80 --labels="app=dev-nginx"
|
||||
|
||||
cat << EOF > nginx-service.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-service
|
||||
spec:
|
||||
selector:
|
||||
app: dev-nginx
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 9372
|
||||
EOF
|
||||
```
|
Reference in New Issue
Block a user