Add system design notebook image

As well as two Kubernetes basic exercises.
This commit is contained in:
abregman
2021-07-12 04:26:03 +03:00
parent e54648d47f
commit e1379fb6b5
6 changed files with 56 additions and 5 deletions

View 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

View 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

View File

@ -0,0 +1,6 @@
## Pods 01 - Solution
```
kubectl run nginx --image=nginx --restart=Never
kubectl get pods
```

View 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
```