You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: 01-path-basics/102-your-first-cluster/readme.adoc
+7-5
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ If you have not set up the link:../101-start-here[Cloud9 Devlopment Environment,
12
12
13
13
== Create a Kubernetes Cluster with kops
14
14
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.
16
16
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.
17
17
18
18
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!
|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]
168
171
|=====
169
172
The next step is link:../103-kubernetes-concepts[to learn about basic Kubernetes Concepts].
170
173
@@ -221,7 +224,7 @@ Although most of the exercises in this workshop should work on a cluster with a
221
224
222
225
=== (Optional) Turn on an API version for your Cluster
223
226
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`.
225
228
226
229
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.
227
230
@@ -301,7 +304,7 @@ The output clearly shows that `--runtime-config=batch/v2alpha1=true` is passed a
301
304
302
305
=== (Optional) Delete A Cluster
303
306
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!
305
308
306
309
This information is to show you how to delete a cluster.
307
310
(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
357
360
358
361
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.
359
362
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.
361
364
362
365
The cluster creation, in that case, is started with the following command:
363
366
@@ -443,4 +446,3 @@ Your cluster example.cluster.com is ready
443
446
Note that all masters are spread across different AZs.
444
447
445
448
Your output may differ from the one shown here based up on the type of cluster you created.
Copy file name to clipboardExpand all lines: 01-path-basics/103-kubernetes-concepts/readme.adoc
+16-17
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ Kubernetes as a platform has a number of abstractions that map to API objects. T
14
14
15
15
== Prerequisites
16
16
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].
18
18
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.
20
20
Please be sure to `cd` into that directory before running the commands below.
21
21
22
22
$ 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
230
230
231
231
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.
232
232
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.
234
234
235
235
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.
236
236
@@ -337,7 +337,7 @@ Watch the status of the Pod:
337
337
wildfly-pod 1/1 Running 3 1m
338
338
wildfly-pod 0/1 OOMKilled 3 1m
339
339
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.
341
341
342
342
In `pod-resources2.yaml`, change the value of `spec.containers[].resources.limits.memory` to `300Mi`. Delete the existing Pod, and create a new one:
343
343
@@ -369,7 +369,7 @@ Kubernetes assigns one of the QoS classes to the Pod:
369
369
370
370
QoS class is used by Kubernetes for scheduling and evicting Pods.
371
371
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.
373
373
374
374
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.
375
375
@@ -1370,7 +1370,7 @@ A new namespace can be created using a configuration file or `kubectl`.
1370
1370
1371
1371
. Create a new Namespace:
1372
1372
1373
-
$ kubectl apply -f namespace.yaml
1373
+
$ kubectl apply -f namespace.yaml
1374
1374
namespace "dev" created
1375
1375
1376
1376
. Get the list of Namespaces:
@@ -1399,31 +1399,31 @@ No resource limits.
1399
1399
+
1400
1400
. Create a Deployment in this new Namespace using a configuration file:
1401
1401
+
1402
-
$ deployment-namespace.yaml
1402
+
$ deployment-namespace.yaml
1403
1403
apiVersion: extensions/v1beta1
1404
1404
kind: Deployment
1405
1405
metadata:
1406
1406
name: nginx-deployment-ns
1407
1407
namespace: dev
1408
1408
spec:
1409
-
replicas: 3
1409
+
replicas: 3
1410
1410
template:
1411
1411
metadata:
1412
1412
labels:
1413
-
app: nginx
1413
+
app: nginx
1414
1414
spec:
1415
1415
containers:
1416
-
- name: nginx
1416
+
- name: nginx
1417
1417
image: nginx:1.12.1
1418
-
ports:
1418
+
ports:
1419
1419
- containerPort: 80
1420
1420
- containerPort: 443
1421
1421
+
1422
1422
The main change is the addition of `namespace: dev`.
1423
1423
+
1424
1424
. Create the Deployment:
1425
1425
1426
-
$ kubectl apply -f deployment-namespace.yaml
1426
+
$ kubectl apply -f deployment-namespace.yaml
1427
1427
deployment "nginx-deployment-ns" created
1428
1428
1429
1429
. 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.
Copy file name to clipboardExpand all lines: 02-path-working-with-clusters/203-cluster-upgrades/readme.adoc
+11-9
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ with 1.6.10 version and perform an automatic rolling upgrade to 1.7.2 using kops
14
14
15
15
=== Create cluster
16
16
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].
18
18
19
19
In this chapter, we'll create a Kubernetes 1.6.10 version cluster as shown:
20
20
@@ -102,7 +102,7 @@ I1028 18:19:04.153174 10844 executor.go:91] Tasks: 78 done / 81 total; 3 can r
102
102
I1028 18:19:04.575327 10844 executor.go:91] Tasks: 81 done / 81 total; 0 can run
Copy file name to clipboardExpand all lines: 02-path-working-with-clusters/204-cluster-logging-with-EFK/readme.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ Fluentd log group name and stream name are configured in the file `templates/flu
75
75
num_threads 8
76
76
</match>
77
77
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`.
79
79
80
80
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.
81
81
@@ -247,5 +247,5 @@ You are now ready to continue on with the workshop!
0 commit comments