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
@@ -233,7 +233,7 @@ If the containers in the pod generate logs, then they can be seen using the comm
233
233
234
234
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.
235
235
236
-
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.
236
+
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.
237
237
238
238
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.
239
239
@@ -340,7 +340,7 @@ Watch the status of the Pod:
340
340
wildfly-pod 1/1 Running 3 1m
341
341
wildfly-pod 0/1 OOMKilled 3 1m
342
342
343
-
`OOMKilled` shows that the container was terminated because it ran out of memory.
343
+
`OOMKilled` shows that the container was terminated because it ran out of memory.
344
344
345
345
In `pod-resources2.yaml`, change the value of `spec.containers[].resources.limits.memory` to `300Mi`. Delete the existing Pod, and create a new one:
346
346
@@ -372,7 +372,7 @@ Kubernetes assigns one of the QoS classes to the Pod:
372
372
373
373
QoS class is used by Kubernetes for scheduling and evicting Pods.
374
374
375
-
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.
375
+
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.
376
376
377
377
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.
378
378
@@ -1373,7 +1373,7 @@ A new namespace can be created using a configuration file or `kubectl`.
1373
1373
1374
1374
. Create a new Namespace:
1375
1375
1376
-
$ kubectl apply -f namespace.yaml
1376
+
$ kubectl apply -f namespace.yaml
1377
1377
namespace "dev" created
1378
1378
1379
1379
. Get the list of Namespaces:
@@ -1402,31 +1402,31 @@ No resource limits.
1402
1402
+
1403
1403
. Create a Deployment in this new Namespace using a configuration file:
1404
1404
+
1405
-
$ deployment-namespace.yaml
1405
+
$ deployment-namespace.yaml
1406
1406
apiVersion: extensions/v1beta1
1407
1407
kind: Deployment
1408
1408
metadata:
1409
1409
name: nginx-deployment-ns
1410
1410
namespace: dev
1411
1411
spec:
1412
-
replicas: 3
1412
+
replicas: 3
1413
1413
template:
1414
1414
metadata:
1415
1415
labels:
1416
-
app: nginx
1416
+
app: nginx
1417
1417
spec:
1418
1418
containers:
1419
-
- name: nginx
1419
+
- name: nginx
1420
1420
image: nginx:1.12.1
1421
-
ports:
1421
+
ports:
1422
1422
- containerPort: 80
1423
1423
- containerPort: 443
1424
1424
+
1425
1425
The main change is the addition of `namespace: dev`.
1426
1426
+
1427
1427
. Create the Deployment:
1428
1428
1429
-
$ kubectl apply -f deployment-namespace.yaml
1429
+
$ kubectl apply -f deployment-namespace.yaml
1430
1430
deployment "nginx-deployment-ns" created
1431
1431
1432
1432
. Deployment in a Namespace can be queried by providing an additional switch `-n` as shown:
@@ -1449,7 +1449,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