Skip to content

Commit f640d19

Browse files
author
Scott Malkie
committed
Add buttons to main readme; Re-add Basics to 103
1 parent 2520626 commit f640d19

File tree

6 files changed

+165
-12
lines changed

6 files changed

+165
-12
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
= Kubernetes - Setup Cloud9 Development Environment
2+
:toc:
23
:icons:
34
:linkattrs:
45
:imagesdir: ../../resources/images
5-
:toc:
6+
67

78
This section walks you through the creating a Kubernetes development environment using https://aws.amazon.com/cloud9/[AWS Cloud9]. This will provide you with a cloud-based integrated development environment (IDE) that will let you write, run, and debug containerized workloads using just a web browser.
89

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

Lines changed: 138 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
:toc:
33
:icons:
44
:linkattrs:
5-
:linkcss:
65
:imagesdir: ../../resources/images
76

8-
== Kubernetes API and CLI
7+
== Introduction
98

109
Now that we have a cluster up and running we can start exploring the Kubernetes CLI via the `kubectl` (pronounced "cube control") command.
1110

@@ -42,6 +41,143 @@ It will show an output similar to:
4241

4342
If you do not see this output, or receive an error, please ensure that you've followed the steps link:../102-your-first-cluster#multi-master[here] and have a validated cluster.
4443

44+
=== Create your first Pod
45+
46+
This command instantiates an nginx container into your cluster, inside a pod:
47+
48+
$ kubectl run nginx --image=nginx
49+
deployment "nginx" created
50+
51+
Get the list of deployments:
52+
53+
$ kubectl get deployments
54+
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
55+
nginx 1 1 1 0 41s
56+
57+
Get the list of running pods:
58+
59+
$ kubectl get pods
60+
NAME READY STATUS RESTARTS AGE
61+
nginx-4217019353-pmkzb 1/1 Running 0 1m
62+
63+
Get additional details for the pod by using the `<pod-name>` from the above output:
64+
65+
```
66+
$ kubectl describe pod/nginx-4217019353-pmkzb
67+
kubectl describe pod/nginx-4217019353-pmkzb
68+
Name: nginx-4217019353-pmkzb
69+
Namespace: default
70+
Node: ip-172-20-87-91.us-east-2.compute.internal/172.20.87.91
71+
Start Time: Fri, 01 Dec 2017 16:36:48 -0800
72+
Labels: pod-template-hash=4217019353
73+
run=nginx
74+
Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"nginx-4217019353","uid":"e161abe9-d6f8-11e7-af8f-06c4465216f2","...
75+
kubernetes.io/limit-ranger=LimitRanger plugin set: cpu request for container nginx
76+
Status: Running
77+
IP: 100.96.7.19
78+
Created By: ReplicaSet/nginx-4217019353
79+
Controlled By: ReplicaSet/nginx-4217019353
80+
Containers:
81+
nginx:
82+
Container ID: docker://2def6a6dc1594c337748abf6160ff81fab9fa6d734aca02b5f1afc4d395edc6b
83+
Image: nginx
84+
Image ID: docker-pullable://nginx@sha256:b81f317384d7388708a498555c28a7cce778a8f291d90021208b3eba3fe74887
85+
Port: <none>
86+
State: Running
87+
Started: Fri, 01 Dec 2017 16:36:52 -0800
88+
Ready: True
89+
Restart Count: 0
90+
Requests:
91+
cpu: 100m
92+
Environment: <none>
93+
Mounts:
94+
/var/run/secrets/kubernetes.io/serviceaccount from default-token-cqht0 (ro)
95+
Conditions:
96+
Type Status
97+
Initialized True
98+
Ready True
99+
PodScheduled True
100+
Volumes:
101+
default-token-cqht0:
102+
Type: Secret (a volume populated by a Secret)
103+
SecretName: default-token-cqht0
104+
Optional: false
105+
QoS Class: Burstable
106+
Node-Selectors: <none>
107+
Tolerations: node.alpha.kubernetes.io/notReady:NoExecute for 300s
108+
node.alpha.kubernetes.io/unreachable:NoExecute for 300s
109+
Events:
110+
Type Reason Age From Message
111+
---- ------ ---- ---- -------
112+
Normal Scheduled 46s default-scheduler Successfully assigned nginx-4217019353-pmkzb to ip-172-20-87-91.us-east-2.compute.internal
113+
Normal SuccessfulMountVolume 46s kubelet, ip-172-20-87-91.us-east-2.compute.internal MountVolume.SetUp succeeded for volume "default-token-cqht0"
114+
Normal Pulling 46s kubelet, ip-172-20-87-91.us-east-2.compute.internal pulling image "nginx"
115+
Normal Pulled 42s kubelet, ip-172-20-87-91.us-east-2.compute.internal Successfully pulled image "nginx"
116+
Normal Created 42s kubelet, ip-172-20-87-91.us-east-2.compute.internal Created container
117+
Normal Started 42s kubelet, ip-172-20-87-91.us-east-2.compute.internal Started container
118+
119+
```
120+
121+
By default, pods are created in a `default` namespace. In addition, a `kube-system` namespace is also reserved for Kubernetes system pods. A list of all the pods in `kube-system` namespace can be displayed as shown:
122+
123+
```
124+
$ kubectl get pods --namespace kube-system
125+
NAME READY STATUS RESTARTS AGE
126+
dns-controller-3497129722-4pxd6 1/1 Running 0 28d
127+
etcd-server-events-ip-172-20-124-26.us-east-2.compute.internal 1/1 Running 0 28d
128+
etcd-server-events-ip-172-20-52-35.us-east-2.compute.internal 1/1 Running 0 28d
129+
etcd-server-events-ip-172-20-94-153.us-east-2.compute.internal 1/1 Running 0 28d
130+
etcd-server-ip-172-20-124-26.us-east-2.compute.internal 1/1 Running 0 28d
131+
etcd-server-ip-172-20-52-35.us-east-2.compute.internal 1/1 Running 0 28d
132+
etcd-server-ip-172-20-94-153.us-east-2.compute.internal 1/1 Running 0 28d
133+
kube-apiserver-ip-172-20-124-26.us-east-2.compute.internal 1/1 Running 0 28d
134+
kube-apiserver-ip-172-20-52-35.us-east-2.compute.internal 1/1 Running 0 28d
135+
kube-apiserver-ip-172-20-94-153.us-east-2.compute.internal 1/1 Running 0 28d
136+
kube-controller-manager-ip-172-20-124-26.us-east-2.compute.internal 1/1 Running 0 28d
137+
kube-controller-manager-ip-172-20-52-35.us-east-2.compute.internal 1/1 Running 0 28d
138+
kube-controller-manager-ip-172-20-94-153.us-east-2.compute.internal 1/1 Running 0 28d
139+
kube-dns-1311260920-jgl0m 3/3 Running 0 28d
140+
kube-dns-1311260920-tvpmp 3/3 Running 0 28d
141+
kube-dns-autoscaler-1818915203-5kxrb 1/1 Running 0 28d
142+
kube-proxy-ip-172-20-105-158.us-east-2.compute.internal 1/1 Running 0 28d
143+
kube-proxy-ip-172-20-124-26.us-east-2.compute.internal 1/1 Running 0 28d
144+
kube-proxy-ip-172-20-127-251.us-east-2.compute.internal 1/1 Running 0 28d
145+
kube-proxy-ip-172-20-52-35.us-east-2.compute.internal 1/1 Running 0 28d
146+
kube-proxy-ip-172-20-63-150.us-east-2.compute.internal 1/1 Running 0 28d
147+
kube-proxy-ip-172-20-71-14.us-east-2.compute.internal 1/1 Running 0 28d
148+
kube-proxy-ip-172-20-87-91.us-east-2.compute.internal 1/1 Running 0 28d
149+
kube-proxy-ip-172-20-94-153.us-east-2.compute.internal 1/1 Running 0 28d
150+
kube-scheduler-ip-172-20-124-26.us-east-2.compute.internal 1/1 Running 0 28d
151+
kube-scheduler-ip-172-20-52-35.us-east-2.compute.internal 1/1 Running 0 28d
152+
kube-scheduler-ip-172-20-94-153.us-east-2.compute.internal 1/1 Running 0 28d
153+
tiller-deploy-1114875906-k2pj2 1/1 Running 0 28d
154+
```
155+
Again, the exact output may vary but your results should look similar to these.
156+
157+
=== Get logs from the pod
158+
159+
Logs from the pod can be obtained (a fresh nginx does not have logs - check again later once you have accessed the service):
160+
161+
$ kubectl logs <pod-name>
162+
163+
=== Execute a shell on the running pod
164+
165+
This command will open a TTY to a shell in your pod:
166+
167+
$ kubectl get pods
168+
$ kubectl exec -it <pod-name> /bin/bash
169+
170+
This opens a bash shell and allows you to look around the filesystem of the container.
171+
172+
=== Clean up
173+
174+
Delete all the Kubernetes resources created so far:
175+
176+
$ kubectl delete deployment/nginx
177+
178+
179+
In the next sections, we will go into more detail about Pods, Deployments, and other commonly used Kubernetes objects.
180+
45181
== Pods
46182

47183
A Pod is the smallest deployable unit that can be created, scheduled, and managed. It’s a logical collection of containers that belong to an application. Pods are created in a namespace. All containers in a pod share the namespace, volumes and networking stack. This allows containers in the pod to "`find`" each other and communicate using `localhost`.

readme.adoc

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
1-
= AWS Workshop for Kubernetes
1+
= Kubernetes the AWSome Way!
2+
:icons:
3+
:linkattrs:
4+
:imagesdir: resources/images
25

3-
image:resources/images/kubernetes-aws-smile.png[alt="kubernetes and aws logos", align="left",width=420]
6+
image:kubernetes-aws-smile.png[alt="kubernetes and aws logos", align="left",width=420]
47

58
This is a self-paced workshop designed for Development and Operations teams who would like to leverage Kubernetes on Amazon Web Services (AWS).
69

710
This workshop provides instructions to create, manage, and scale a Kubernetes cluster on AWS, as well as how to deploy applications, scale them, run stateless and stateful containers, perform service discovery between different microservices, and other similar concepts.
811

912
It also shows deep integration with several AWS technologies.
1013

11-
== Paths
14+
We recommend at least 2 hours for the standard workshop path.
1215

13-
There are two main paths. Each path should take approximately 4 hours to complete.
14-
[cols="2*^"]
16+
Click the button below to start!
17+
18+
image::button-start-standard.png[link=standard-path.adoc]
19+
20+
== Extended Paths
21+
22+
The workshop also contains extended paths for Developers or Operations Engineers.
23+
The extended paths go into much greater detail regarding features and capabilities of Kubernetes specifically for those Teams.
24+
We recommend at least 4 hours for each of the extended paths.
25+
26+
Click on one of the two buttons below to start!
27+
28+
:frame: none
29+
:grid: none
30+
:valign: top
31+
32+
[align="center", cols="2*"]
1533
|=====
16-
|link:developer-path.adoc[For Developers or Development Teams]
17-
|link:operations-path.adoc[For Operations Engineers or Operations Teams]
34+
|image:button-start-developer.png[link=developer-path.adoc]
35+
|image:button-start-operations.png[link=operations-path.adoc]
1836
|=====
1937

20-
For those looking for a more condensed introduction to Kubernetes on AWS, there is also a link:combined-path.adoc[Combined Version], which should take approximately 2 hours to complete.
21-
2238

2339
NOTE: You will incur charges as you go through these workshop guides as it will exceed the link:http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/free-tier-limits.html[limits of AWS free tier]. An estimate of charges (<$20/day) can be seen at this link:https://calculator.s3.amazonaws.com/index.html#r=FRA&s=EC2&key=calc-E6DBD6F1-C45D-4827-93F8-D9B18C5994B0[simple monthly calculator]
327 KB
Loading
327 KB
Loading
392 KB
Loading

0 commit comments

Comments
 (0)