Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 085cdb1

Browse files
authored
Merge pull request #338 from dalbhanj/master
Minor fixes, moved Workshop cleanup up to Index page
2 parents a4eab82 + 297b733 commit 085cdb1

File tree

28 files changed

+237
-161
lines changed

28 files changed

+237
-161
lines changed

01-path-basics/101-start-here/readme.adoc

+4
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,14 @@ You are now ready to continue on with the workshop!
9393
|image:button-continue-standard.png[link=../102-your-first-cluster/]
9494
|image:button-continue-developer.png[link=../102-your-first-cluster/]
9595
|image:button-continue-operations.png[link=../102-your-first-cluster/]
96+
|link:../../standard-path.adoc[Go to Standard Index]
97+
|link:../../developer-path.adoc[Go to Developer Index]
98+
|link:../../operations-path.adoc[Go to Operations Index]
9699
|=====
97100

98101
The next step is link:../102-your-first-cluster[to create a Kubernetes cluster using kops].
99102

103+
100104
== Workshop Cleanup
101105

102106
Once you have finished with the workshop, please don't forget to spin down your cluster or you will incur additional charges.

01-path-basics/102-your-first-cluster/readme.adoc

+7-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have not set up the link:../101-start-here[Cloud9 Devlopment Environment,
1212
1313
== Create a Kubernetes Cluster with kops
1414
15-
kops can be used to create a highly available cluster, with multiple master and worker nodes spread across multiple availability zones.
15+
kops can be used to create a highly available cluster, with multiple master and worker nodes spread across multiple availability zones.
1616
The master and worker nodes within the cluster can use either DNS or the https://github.com/weaveworks/mesh[Weave Mesh, window="_blank"] *gossip* protocol for name resolution. For this workshop, we will use the gossip protocol. A gossip-based cluster is easier and quicker to setup, and does not does not require a domain, subdomain, or Route53 hosted zone to be registered. Instructions for creating a DNS-based cluster are provided as an appendix at the bottom of this page.
1717
1818
To create a cluster using the gossip protocol, simply use a cluster name with a suffix of `.k8s.local`. In the following steps, we will use `example.cluster.k8s.local` as a sample gossip cluster name. You may choose a different name as long as it ends with `.k8s.local`.
@@ -165,6 +165,9 @@ You are now ready to continue on with the workshop!
165165
|image:button-continue-standard.png[link=../103-kubernetes-concepts/]
166166
|image:button-continue-developer.png[link=../103-kubernetes-concepts/]
167167
|image:button-continue-operations.png[link=../103-kubernetes-concepts/]
168+
|link:../../standard-path.adoc[Go to Standard Index]
169+
|link:../../developer-path.adoc[Go to Developer Index]
170+
|link:../../operations-path.adoc[Go to Operations Index]
168171
|=====
169172
The next step is link:../103-kubernetes-concepts[to learn about basic Kubernetes Concepts].
170173

@@ -221,7 +224,7 @@ Although most of the exercises in this workshop should work on a cluster with a
221224

222225
=== (Optional) Turn on an API version for your Cluster
223226

224-
Note: This section is for Kubebernetes 1.7.x, in 1.8.x the api is `batch/v1beta1`.
227+
Note: This section is for Kubebernetes 1.7.x, in 1.8.x the api is `batch/v1beta1`.
225228

226229
Kubernetes resources are created with a specific API version. The exact value is defined by the `apiVersion` attribute in the resource configuration file. Some of the values are `v1`, `extensions/v1beta1` or `batch/v1`. By default, resources with `apiVersion` values X, Y, Z are enabled. If a resource has a version with the word `alpha` in it, then that version needs to be explicitly enabled in the cluster. For example, if you are running a Kubernetes cluster of version 1.7.x, then Cron Job resource cannot be created unless `batch/v2alpha1` is explicitly enabled.
227230

@@ -301,7 +304,7 @@ The output clearly shows that `--runtime-config=batch/v2alpha1=true` is passed a
301304

302305
=== (Optional) Delete A Cluster
303306

304-
Note: If you are going through the workshop paths, please do not delete the cluster you just created!
307+
Note: If you are going through the workshop paths, please do not delete the cluster you just created!
305308

306309
This information is to show you how to delete a cluster.
307310
(We will also provide these instructions at the end of the workshop.)
@@ -357,7 +360,7 @@ Create a Kubernetes cluster using the following command. For the purposes of thi
357360

358361
The `create cluster` command only creates and stores the cluster config in the S3 bucket. Adding `--yes` option ensures that the cluster is immediately created as well.
359362

360-
Alternatively, you may leave off the `--yes` option from the `kops create cluster` command. This will allow you to use `kops edit cluster example.cluster.com` command to view the current cluster state and make changes before actually creating the cluster.
363+
Alternatively, you may leave off the `--yes` option from the `kops create cluster` command. This will allow you to use `kops edit cluster example.cluster.com` command to view the current cluster state and make changes before actually creating the cluster.
361364

362365
The cluster creation, in that case, is started with the following command:
363366

@@ -443,4 +446,3 @@ Your cluster example.cluster.com is ready
443446
Note that all masters are spread across different AZs.
444447

445448
Your output may differ from the one shown here based up on the type of cluster you created.
446-

01-path-basics/103-kubernetes-concepts/readme.adoc

+16-17
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Kubernetes as a platform has a number of abstractions that map to API objects. T
1414

1515
== Prerequisites
1616

17-
This chapter uses a cluster with 3 master nodes and 5 worker nodes as described link:../102-your-first-cluster#multi-master[here].
17+
This chapter uses a cluster with 3 master nodes and 5 worker nodes as described link:../102-your-first-cluster#multi-master[here].
1818

19-
All configuration files for this chapter are in the `01-path-basics/103-kubernetes-concepts/templates` directory.
19+
All configuration files for this chapter are in the `01-path-basics/103-kubernetes-concepts/templates` directory.
2020
Please be sure to `cd` into that directory before running the commands below.
2121

2222
$ cd 01-path-basics/103-kubernetes-concepts/templates
@@ -230,7 +230,7 @@ If the containers in the pod generate logs, then they can be seen using the comm
230230

231231
A Container in a Pod can be assigned memory and CPU _request_ and _limit_. Request is the minimum amount of memory/CPU that Kubernetes will give to the container. Limit is the maximum amount of memory/CPU that a container will be allowed to use. The memory/CPU request/limit for the Pod is the sum of the memory/CPU requests/limits for all the Containers in the Pod. Request defaults to limit if not specified. Default value of the limit is the node capacity.
232232

233-
A Pod can be scheduled on a node if the Pod's memory and CPU request can be met. Memory and CPU limits are not taken into consideration for scheduling.
233+
A Pod can be scheduled on a node if the Pod's memory and CPU request can be met. Memory and CPU limits are not taken into consideration for scheduling.
234234

235235
Pod can continue to operate on the node if Containers in the Pod does not exceed the memory request. If Containers in the Pod exceeds the memory request then they become target of eviction whenever the node runs out of memory. If Containers in the Pod exceeds the memory limit then they are terminated. If the Pod can be restarted, then kubelet will restart it, just like any other type of runtime failure. A Container might or might not be allowed to exceed its CPU limit for extended periods of time. However, it will not be killed for excessive usage.
236236

@@ -337,7 +337,7 @@ Watch the status of the Pod:
337337
wildfly-pod 1/1 Running 3 1m
338338
wildfly-pod 0/1 OOMKilled 3 1m
339339

340-
`OOMKilled` shows that the container was terminated because it ran out of memory.
340+
`OOMKilled` shows that the container was terminated because it ran out of memory.
341341

342342
In `pod-resources2.yaml`, change the value of `spec.containers[].resources.limits.memory` to `300Mi`. Delete the existing Pod, and create a new one:
343343

@@ -369,7 +369,7 @@ Kubernetes assigns one of the QoS classes to the Pod:
369369

370370
QoS class is used by Kubernetes for scheduling and evicting Pods.
371371

372-
When every Container in a Pod is given a memory and CPU limit, and optionally non-zero request, and they exactly match, then a Pod is scheduled with `Guaranteed` QoS. This is the higest priority.
372+
When every Container in a Pod is given a memory and CPU limit, and optionally non-zero request, and they exactly match, then a Pod is scheduled with `Guaranteed` QoS. This is the higest priority.
373373

374374
A Pod is given `Burstable` QoS class if the Pod does not meet the `Guaranteed` QoS and at least one Container has a memory or CPU request. This is intermediate priority.
375375

@@ -1370,7 +1370,7 @@ A new namespace can be created using a configuration file or `kubectl`.
13701370

13711371
. Create a new Namespace:
13721372

1373-
$ kubectl apply -f namespace.yaml
1373+
$ kubectl apply -f namespace.yaml
13741374
namespace "dev" created
13751375

13761376
. Get the list of Namespaces:
@@ -1399,31 +1399,31 @@ No resource limits.
13991399
+
14001400
. Create a Deployment in this new Namespace using a configuration file:
14011401
+
1402-
$ deployment-namespace.yaml
1402+
$ deployment-namespace.yaml
14031403
apiVersion: extensions/v1beta1
14041404
kind: Deployment
14051405
metadata:
14061406
name: nginx-deployment-ns
14071407
namespace: dev
14081408
spec:
1409-
replicas: 3
1409+
replicas: 3
14101410
template:
14111411
metadata:
14121412
labels:
1413-
app: nginx
1413+
app: nginx
14141414
spec:
14151415
containers:
1416-
- name: nginx
1416+
- name: nginx
14171417
image: nginx:1.12.1
1418-
ports:
1418+
ports:
14191419
- containerPort: 80
14201420
- containerPort: 443
14211421
+
14221422
The main change is the addition of `namespace: dev`.
14231423
+
14241424
. Create the Deployment:
14251425

1426-
$ kubectl apply -f deployment-namespace.yaml
1426+
$ kubectl apply -f deployment-namespace.yaml
14271427
deployment "nginx-deployment-ns" created
14281428

14291429
. Deployment in a Namespace can be queried by providing an additional switch `-n` as shown:
@@ -1446,7 +1446,7 @@ Alternatively, a namespace can be created using `kubectl` as well.
14461446

14471447
. Create a Deployment:
14481448

1449-
$ kubectl -n dev2 apply -f templates/deployment.yaml
1449+
$ kubectl -n dev2 apply -f templates/deployment.yaml
14501450
deployment "nginx-deployment-ns" created
14511451

14521452
. Get Deployments in the newly created Namespace:
@@ -1646,8 +1646,7 @@ You are now ready to continue on with the workshop!
16461646
|image:button-continue-standard.png[link=../../02-path-working-with-clusters/201-cluster-monitoring]
16471647
|image:button-continue-developer.png[link=../../03-path-application-development/301-local-development]
16481648
|image:button-continue-operations.png[link=../../02-path-working-with-clusters/201-cluster-monitoring]
1649+
|link:../../standard-path.adoc[Go to Standard Index]
1650+
|link:../../developer-path.adoc[Go to Developer Index]
1651+
|link:../../operations-path.adoc[Go to Operations Index]
16491652
|=====
1650-
1651-
1652-
1653-

02-path-working-with-clusters/201-cluster-monitoring/readme.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -329,4 +329,6 @@ You are now ready to continue on with the workshop!
329329
|=====
330330
|image:button-continue-standard.png[link=../../02-path-working-with-clusters/202-service-mesh]
331331
|image:button-continue-operations.png[link=../../02-path-working-with-clusters/202-service-mesh]
332-
|=====
332+
|link:../../standard-path.adoc[Go to Standard Index]
333+
|link:../../operations-path.adoc[Go to Operations Index]
334+
|=====

02-path-working-with-clusters/202-service-mesh/readme.adoc

+3-2
Original file line numberDiff line numberDiff line change
@@ -475,5 +475,6 @@ You are now ready to continue on with the workshop!
475475
|=====
476476
|image:button-continue-standard.png[link=../../02-path-working-with-clusters/203-cluster-upgrades]
477477
|image:button-continue-operations.png[link=../../02-path-working-with-clusters/203-cluster-upgrades]
478-
|=====
479-
478+
|link:../../standard-path.adoc[Go to Standard Index]
479+
|link:../../operations-path.adoc[Go to Operations Index]
480+
|=====

02-path-working-with-clusters/203-cluster-upgrades/readme.adoc

+11-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ with 1.6.10 version and perform an automatic rolling upgrade to 1.7.2 using kops
1414

1515
=== Create cluster
1616

17-
Review steps to create link:../prereqs.adoc[prereqs] nad make sure `KOPS_STATE_STORE` and `AWS_AVAILABILITY_ZONES` environment variables are set. More details about creating a cluster are at link:../cluster-install[Create Kubernetes cluster using kops].
17+
Review steps to create link:../prereqs.adoc[prereqs] nad make sure `KOPS_STATE_STORE` and `AWS_AVAILABILITY_ZONES` environment variables are set. More details about creating a cluster are at link:../cluster-install[Create Kubernetes cluster using kops].
1818

1919
In this chapter, we'll create a Kubernetes 1.6.10 version cluster as shown:
2020

@@ -102,7 +102,7 @@ I1028 18:19:04.153174 10844 executor.go:91] Tasks: 78 done / 81 total; 3 can r
102102
I1028 18:19:04.575327 10844 executor.go:91] Tasks: 81 done / 81 total; 0 can run
103103
Will modify resources:
104104
LaunchConfiguration/master-eu-central-1a.masters.cluster.k8s.local
105-
UserData
105+
UserData
106106
...
107107
cat > kube_env.yaml << __EOF_KUBE_ENV
108108
Assets:
@@ -113,10 +113,10 @@ Will modify resources:
113113
- 1d9788b0f5420e1a219aad2cb8681823fc515e7c@https://storage.googleapis.com/kubernetes-release/network-plugins/cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz
114114
- c18ca557507c662e3a072c3475da9bd1bc8a503b@https://kubeupv2.s3.amazonaws.com/kops/1.7.1/linux/amd64/utils.tar.gz
115115
...
116-
116+
117117

118118
LaunchConfiguration/master-eu-central-1b.masters.cluster.k8s.local
119-
UserData
119+
UserData
120120
...
121121
cat > kube_env.yaml << __EOF_KUBE_ENV
122122
Assets:
@@ -127,10 +127,10 @@ Will modify resources:
127127
- 1d9788b0f5420e1a219aad2cb8681823fc515e7c@https://storage.googleapis.com/kubernetes-release/network-plugins/cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz
128128
- c18ca557507c662e3a072c3475da9bd1bc8a503b@https://kubeupv2.s3.amazonaws.com/kops/1.7.1/linux/amd64/utils.tar.gz
129129
...
130-
130+
131131

132132
LaunchConfiguration/master-eu-central-1c.masters.cluster.k8s.local
133-
UserData
133+
UserData
134134
...
135135
cat > kube_env.yaml << __EOF_KUBE_ENV
136136
Assets:
@@ -141,10 +141,10 @@ Will modify resources:
141141
- 1d9788b0f5420e1a219aad2cb8681823fc515e7c@https://storage.googleapis.com/kubernetes-release/network-plugins/cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz
142142
- c18ca557507c662e3a072c3475da9bd1bc8a503b@https://kubeupv2.s3.amazonaws.com/kops/1.7.1/linux/amd64/utils.tar.gz
143143
...
144-
144+
145145

146146
LaunchConfiguration/nodes.cluster.k8s.local
147-
UserData
147+
UserData
148148
...
149149
cat > kube_env.yaml << __EOF_KUBE_ENV
150150
Assets:
@@ -155,7 +155,7 @@ Will modify resources:
155155
- 1d9788b0f5420e1a219aad2cb8681823fc515e7c@https://storage.googleapis.com/kubernetes-release/network-plugins/cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz
156156
- c18ca557507c662e3a072c3475da9bd1bc8a503b@https://kubeupv2.s3.amazonaws.com/kops/1.7.1/linux/amd64/utils.tar.gz
157157
...
158-
158+
159159

160160
LoadBalancer/api.cluster.k8s.local
161161
Lifecycle <nil> -> Sync
@@ -298,4 +298,6 @@ You are now ready to continue on with the workshop!
298298
|=====
299299
|image:button-continue-standard.png[link=../../03-path-application-development/302-app-discovery]
300300
|image:button-continue-operations.png[link=../../02-path-working-with-clusters/204-cluster-logging-with-EFK]
301+
|link:../../standard-path.adoc[Go to Standard Index]
302+
|link:../../operations-path.adoc[Go to Operations Index]
301303
|=====

02-path-working-with-clusters/204-cluster-logging-with-EFK/readme.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Fluentd log group name and stream name are configured in the file `templates/flu
7575
num_threads 8
7676
</match>
7777

78-
It uses the default log group name of `kubernetes-logs` and the log stream name of `fluentd-cloudwatch`.
78+
It uses the default log group name of `kubernetes-logs` and the log stream name of `fluentd-cloudwatch`.
7979

8080
If you've followed the instructions in this chapter as is, then no change is required in this configuration file. However if a different log group name is used in the previous command or a different log stream name is needed, then that needs to be configured in this configuration file.
8181

@@ -247,5 +247,5 @@ You are now ready to continue on with the workshop!
247247
[align="center", cols="1", grid="none", frame="none"]
248248
|=====
249249
|image:button-continue-operations.png[link=../../02-path-working-with-clusters/204-cluster-logging-with-EFK]
250+
|link:../../operations-path.adoc[Go to Operations Index]
250251
|=====
251-

0 commit comments

Comments
 (0)