forked from bregman-arie/devops-exercises
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As well as two Kubernetes basic exercises.
- Loading branch information
abregman
committed
Jul 12, 2021
1 parent
e54648d
commit e1379fb
Showing
6 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Pods 01 - Solution | ||
|
||
``` | ||
kubectl run nginx --image=nginx --restart=Never | ||
kubectl get pods | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.