Skip to content

Commit

Permalink
Merge pull request #2 from Flasheh/master
Browse files Browse the repository at this point in the history
Typo fixes
  • Loading branch information
trescst authored Sep 30, 2019
2 parents 9dcf557 + 2dcf2a5 commit f6d1fed
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 42 deletions.
8 changes: 4 additions & 4 deletions lab-03/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ kube-system kube-scheduler-minikube 1/1 Running 2 21
kube-system storage-provisioner 1/1 Running 3 21h
```

## Task 5: Chaning the default context
## Task 5: Changing the default context

As mentioned above, we can can change the behaviour that when no namespace is
specified, the default namespace is assumed. This is done by changing the
Expand Down Expand Up @@ -166,7 +166,7 @@ kubectl config set-context --current --namespace=kube-system
Context "minikube" modified.
```

If we now run `kubectl get all` without specifying a namespace we gat all the
If we now run `kubectl get all` without specifying a namespace we get all the
objects of the `kube-system` namespace:

```
Expand Down Expand Up @@ -215,7 +215,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 21h
```

Now change the context againg to its normal behavior:
Now change the context again to its normal behavior:

```
kubectl config set-context --current --namespace=default
Expand All @@ -237,4 +237,4 @@ kubectl delete ns test
---
namespace "test" deleted
```
```
4 changes: 2 additions & 2 deletions lab-04/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pod "nginx" created
```

The above command will create a single pod that is based on the official nginx
Docker image. Run the following command to verify that the pods has been
Docker image. Run the following command to verify that the pod has been
created and is in the running state (if the pod is not yet in the running state
wait a couple of seconds and try to run the command again):

Expand Down Expand Up @@ -202,4 +202,4 @@ kubectl delete ns lab-04
---
namespace "lab-04" deleted
```
```
6 changes: 3 additions & 3 deletions lab-06/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ kubectl scale deployment container-info --replicas=3 -n lab-06
deployment.extensions "container-info" scaled
```

When you do a `kubectl get pods -n lab-06` quicily enough you will see that
When you do a `kubectl get pods -n lab-06` quickly enough you will see that
there are 2 additional container-info pods being started (if you are not fast
enough you will see them in the `Running` state already).

Expand Down Expand Up @@ -142,7 +142,7 @@ kubectl expose deployment container-info --type=NodePort --name=container-info -
```

Our service is exposed now. Let's go find the port where it is running on. We
will be able to open te service in your default browser with the following
will be able to open the service in your default browser with the following
command.

```
Expand Down Expand Up @@ -203,4 +203,4 @@ kubectl delete ns lab-06
---
namespace "lab-06" deleted
```
```
6 changes: 3 additions & 3 deletions lab-07/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ container-info-5998b79944-t4h6n 1/1 Running 0 21s
container-info-5998b79944-vkmcg 1/1 Running 0 21s
```

Now reate a file `lab-07-service.yml` with the YAML for the service using the
Now create a file `lab-07-service.yml` with the YAML for the service using the
content below:

```
Expand Down Expand Up @@ -110,7 +110,7 @@ kubectl get service -n lab-07
---
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
container-info ClusterIP 10.27.247.106 <none> 80/TCP 7m
container-info NodePort 10.27.247.106 <none> 80/TCP 7m
```

## Task 2: Inspecting your first service
Expand Down Expand Up @@ -187,4 +187,4 @@ kubectl delete ns lab-07
---
namespace "lab-07" deleted
```
```
10 changes: 5 additions & 5 deletions lab-08/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Configmaps make it possible to change configuration of a application (pod),
without needing to completely rebuild a Docker image. Let's try this.

Issue the following command, and replace the image color to `yellow` and save
the file (you we get a `configmap "container-info-env" edited` message when
the file (you will get a `configmap "container-info-env" edited` message when
succesful):

```
Expand All @@ -145,7 +145,7 @@ minikube service container-info -n lab-08
```

You should notice that the color has NOT changed... Do not worry, this is
expecte behaviour. Before we see the change we need to restart the pod, for ease
expected behaviour. Before we see the change we need to restart the pod, for ease
of use we will do this by simply deleting the pod (Kubernetes we start a new
one automatically).

Expand Down Expand Up @@ -244,7 +244,7 @@ lab-08-secret-literal Opaque 1 1m
## Task 6: Creating a secret from YAML

Our last option we have is to create the secret directly from a yaml. This is
similar to how we create services, deployments,... and andy other Kubernetes
similar to how we create services, deployments,... and any other Kubernetes
objects we already created in these labs. First we need to encrypt our
password.

Expand Down Expand Up @@ -307,7 +307,7 @@ You will see the encoded password in the YAML. This can be decoded using the
following command.

```
echo 'TjBUJG9TM2NSRXRQQFNTdzByRA===' | base64 --decode
echo 'TjBUJG9TM2NSRXRQQFNTdzByRA==' | base64 --decode
```

This will output : `N0T$oS3cREtP@SSw0rD`
Expand All @@ -324,4 +324,4 @@ kubectl delete ns lab-08
---
namespace "lab-08" deleted
```
```
4 changes: 2 additions & 2 deletions lab-09/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ kubectl apply -f lab-09-pv.yml
persistentvolume "lab-09-volume" created
```

At this point the persistent volume is created. Be sure that it its by using the
At this point the persistent volume is created. Be sure that it is by using the
get command.

```
Expand Down Expand Up @@ -299,4 +299,4 @@ minikube ssh
sudo su -
rm -rf /mnt/data/
```
```
4 changes: 2 additions & 2 deletions lab-10/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace "lab-10" created

## Task 1: Creating objects using a list

You can put different Kubernetes opbjects in a list, and apply the list instead
You can put different Kubernetes objects in a list, and apply the list instead
of applying the objects seperatly. This will deploy all the resources you have
listed in this list.

Expand Down Expand Up @@ -107,4 +107,4 @@ kubectl delete ns lab-10
---
namespace "lab-10" deleted
```
```
4 changes: 2 additions & 2 deletions lab-12/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace "lab-12" created
To test the readiness of a pod we are going to create the following file. Name
the file `lab-12-probe-readiness.yml` and fill with the content below.

Pay special attention the the`readinessProbe` section. This is the check that
Pay special attention to the`readinessProbe` section. This is the check that
Kubernetes will perform continuously to see if a pod is ready or not.

```
Expand Down Expand Up @@ -269,4 +269,4 @@ kubectl delete ns lab-12
---
namespace "lab-12" deleted
```
```
38 changes: 19 additions & 19 deletions lab-16/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ You can also use a Job to run multiple Pods in parallel.
Create a namespace for this lab:

```
kubectl create ns lab-19
kubectl create ns lab-16
---
namespace "lab-19" created
namespace "lab-16" created
```

## Task 1: Running an example Job

Here is an example Job config. It computes π to 2000 places and prints it out.
It takes around 10s to complete.

job.yaml:
lab-16-job.yml:

```
apiVersion: batch/v1
Expand All @@ -49,12 +49,12 @@ spec:
backoffLimit: 4
```

Now let’s run `kubectl create -f job.yaml -n lab-19` to deploy the example.
Now let’s run `kubectl create -f lab-16-job.yml -n lab-16` to deploy the example.

## Task 2: Check the status of the job

```
kubectl describe jobs/pi
kubectl describe jobs/pi -n lab-16
---
Expand Down Expand Up @@ -93,15 +93,15 @@ Events:
Normal SuccessfulCreate 51s job-controller Created pod: pi-vxccp
```

To view completed Pods of a Job, use `kubectl get pods`.
To view completed Pods of a Job, use `kubectl get pods -n lab-16`.

To list all the Pods that belong to a Job in a machine readable form, you can use a command like this:

```
pods=$(kubectl get pods --selector=job-name=pi --output=jsonpath='{.items[*].metadata.name}')
pods=$(kubectl get pods -n lab-16 --selector=job-name=pi --output=jsonpath='{.items[*].metadata.name}')
echo $pods
kubectl logs $pods
kubectl logs $pods -n lab-16
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275901
```
Expand All @@ -113,7 +113,7 @@ either. Keeping them around allows you to still view the logs of completed pods
to check for errors, warnings, or other diagnostic output. The job object also
remains after it is completed so that you can view its status. It is up to the
user to delete old jobs after noting their status. Delete the job with kubectl
(e.g. kubectl delete jobs/pi or kubectl delete -f ./job.yaml). When you delete
(e.g. kubectl delete jobs/pi or kubectl delete -f ./lab-16-job.yml). When you delete
the job using kubectl, all the pods it created are deleted too.

## Cronjob
Expand All @@ -128,7 +128,7 @@ job periodically on a given schedule, written in Cron format.
Cron jobs require a config file. This example cron job config .spec file prints
the current time and a hello message every minute:

Create the following cronjob.yaml file:
Check out the following CronJob yaml:

```
apiVersion: batch/v1beta1
Expand All @@ -154,20 +154,20 @@ spec:
Run the example CronJob by using this command:

```
kubectl create -f https://k8s.io/examples/application/job/cronjob.yaml
kubectl create -f https://k8s.io/examples/application/job/cronjob.yaml -n lab-16
```

After creating the cron job, get its status using this command:

```
kubectl get cronjob hello
kubectl get cronjob hello -n lab-16
```

As you can see from the results of the command, the cron job has not scheduled
or run any jobs yet. Watch for the job to be created in around one minute:

```
kubectl get jobs --watch
kubectl get jobs --watch -n lab-16
```

The output is similar to this:
Expand All @@ -183,13 +183,13 @@ Now, find the pods that the last scheduled job created and view the standard out

```
# Replace "hello-4111706356" with the job name in your system
pods=$(kubectl get pods --selector=job-name=hello-4111706356 --output=jsonpath={.items[].metadata.name})
pods=$(kubectl get pods -n lab-16 --selector=job-name=hello-4111706356 --output=jsonpath={.items[].metadata.name})
```

Show pod log:

```
kubectl logs $pods
kubectl logs $pods -n lab-16
Tue Aug 27 12:58:07 UTC 2019
Hello from the Kubernetes cluster
Expand All @@ -198,17 +198,17 @@ Hello from the Kubernetes cluster
Delete the Cron Job

```
kubectl delete cronjob hello
kubectl delete cronjob hello -n lab-16
```

## Task 4: Cleaning up

In order to delete our daemonset use the following command:

```
kubectl delete ns lab-19
kubectl delete ns lab-16
---
namespace "lab-19" deleted
```
namespace "lab-16" deleted
```

0 comments on commit f6d1fed

Please sign in to comment.