forked from kubernetes-retired/kubernetes-bootcamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
3-1.html
377 lines (318 loc) · 12.8 KB
/
3-1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<!DOCTYPE html>
<!--[if IE 9]><html class="lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kubernetes Bootcamp</title>
<meta name="description" content="K8S">
<meta name="keywords" content="K8S Keywords">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta property="og:title" content="K8S - Bootcamp Overview">
<meta property="og:type" content="website">
<meta property="og:url" content="index.html">
<meta property="og:image" content="./public/uploads/soc_index.jpg">
<meta property="og:description" content="K8S">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@empty">
<meta name="twitter:title" content="K8S - Bootcamp Overview">
<meta name="twitter:description" content="K8S">
<meta name="twitter:creator" content="@k8s">
<meta name="twitter:image:src" content="./public/uploads/soc_index.jpg">
<meta name="twitter:domain" content="index.html">
<meta itemprop="name" content="K8S - Bootcamp Overview">
<meta itemprop="description" content="K8S">
<meta itemprop="image" content="./public/uploads/soc_index.jpg">
<link rel="manifest" href="./manifest.json?v=1470121828969">
<link rel="mask-icon" href="./public/images/safari-pinned-tab.svg?v=1470121828969" color="#A2B2F2">
<meta name="msapplication-TileColor" content="#A2B2F2">
<meta name="theme-color" content="#A2B2F2">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-touch-fullscreen" content="yes">
<link href='https://fonts.googleapis.com/css?family=Roboto:400,500,700,900,300,100' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href="./public/css/swiper.min.css" rel="stylesheet">
<link href="./public/css/styles.css" rel="stylesheet">
<!--<script src="./public/js/jquery-3.1.0.min.js"></script>-->
<script src="./public/js/jquery-1.12.1.min.js"></script>
<script src="./public/js/bootstrap.min.js"></script>
<script src="./public/js/swiper.jquery.min.js"></script>
<script src='./public/js/ractive.js'></script>
<script src="./public/js/common.js"></script>
</head>
<body>
<div class="layout" id="top">
<aside class="sidebar">
<div class="sidebar__inner">
<header class="header">
<a class="header__site" href="index.html">
<img class="header__logo" src="./public/images/logo.svg?v=1470121828969" alt="">
<img class="header__logo-mobile" src="./public/images/logo_2.svg?v=1470121828969" alt="">
<span class="header__name">Bootcamp</span>
</a>
<div class="header__sider">
<div class="header__burger"></div>
</div>
</header>
<ul class="nav">
<li class="marked">
<a href="index.html">
<span class="sidebar__ico"></span>
Bootcamp Overview
</a>
</li>
<li class="marked">
<a href="1-0.html">
<span class="sidebar__ico"></span>
1. Create a cluster
</a>
</li>
<li class="marked">
<a href="2-0.html">
<span class="sidebar__ico"></span>
2. Deploy an app
</a>
</li>
<li class="sidebar__subnav open marked">
<a href="3-0.html">
<span class="sidebar__ico"></span>
3. Explore your app
</a>
<ul class="nav">
<li class="active">
<a href="3-1.html">
<span class="sidebar__ico"></span>
Pods and Nodes
</a>
</li>
<li>
<a href="3-2.html">
<span class="sidebar__ico"></span>
Try interactively
</a>
</li>
<li>
<a href="3-3.html">
<span class="sidebar__ico"></span>
Quiz
</a>
</li>
</ul>
</li>
<li>
<a href="4-0.html">
<span class="sidebar__ico"></span>
4. Expose your app publicly
</a>
</li>
<li>
<a href="5-0.html">
<span class="sidebar__ico"></span>
5. Scale up your app
</a>
</li>
<li class="sidebar__subnav">
<a href="6-0.html">
<span class="sidebar__ico"></span>
6. Update your app
</a>
</li>
</ul>
<!-- header start -->
<footer class="footer" role="contentinfo">
<div class="footer__content">
<ul class="footer__social">
<li class="footer__social-item">
<a class="footer__network" href="https://twitter.com/kubernetesio" target="_blank">
<i class="fa fa-twitter" aria-hidden="true"></i>
</a>
</li>
<li class="footer__social-item">
<a class="footer__network" href="https://github.com/kubernetes/kubernetes" target="_blank">
<i class="fa fa-github" aria-hidden="true"></i>
</a>
</li>
<li class="footer__social-item">
<a class="footer__network" href="https://groups.google.com/forum/#!forum/google-containers" target="_blank">
<i class="fa fa-envelope" aria-hidden="true"></i>
</a>
</li>
</ul>
<ul class="footer__menu">
<li class="footer__item">
<a class="footer__link" href="http://kubernetes.io/">Kubernetes</a>
</li>
<li class="footer__item">
<a class="footer__link" href="http://kubernetes.io/docs/">View Documentation</a>
</li>
<li class="footer__item">
<a class="footer__link" href="https://github.com/kubernetes/kubernetes">Github</a>
</li>
</ul>
<div class="footer__copyright">
<b>© 2016 Kubernetes</b><br>
developed and designed by<br>
<a href="http://container-solutions.com/" target="_blank">Container Solutions</a> & <a href="http://www.remembertoplay.co" target="_blank">Remember to Play</a>
</div>
</div>
</footer>
<!-- header finish --> <a class="scrolltop" href="#top"></a>
</div>
</aside>
<main class="content">
<div class="content__sider">
<a class="content__trigger" href="#" role="button"></a>
</div>
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
<li class="active"><a href="3-0.html">Module 3 | Explore your app</a></li>
</ol>
</div>
</div>
<h1>Pods and Nodes</h1>
<div class="row">
<div class="col-md-12 text-left">
<a class="btn btn-default" href="3-0.html" role="button"><span class="btn__prev">‹</span> Back</a>
</div>
</div>
<br>
<br>
<div class="row">
<div class="col-md-8">
<h2>Pods</h2>
<p>When you created a Deployment in Module <a href="2-0.html">2</a>, Kubernetes created a <b>Pod</b> to host your application instance. A Pod is Kubernetes abstraction that represents a group of one or more application containers (such as Docker or rkt), and some shared resources for those containers. Those resources include:</p>
<ul>
<li>Shared storage, as Volumes</li>
<li>Networking, as a unique cluster IP address</li>
<li>Information about how to run each container, such as the container image version or specific ports to use</li>
</ul>
<p>A Pod models an application-specific “logical host” and can contain different application containers which are relatively tightly coupled. For example, a Pod might include both the container with your NodeJS app as well as a different container that feeds the data to be published by the NodeJS webserver. The containers in a Pod share an IP Address and port space, are always co-located and co-scheduled, and run in a shared context on the same Node.</p>
<p>Pods are the atomic unit on the Kubernetes platform. When we create a Deployment on Kubernetes, that Deployment creates Pods with containers inside them (as opposed to creating containers directly). Each Pod is tied to the Node where it is scheduled, and remains there until termination (according to restart policy) or deletion. In case of a Node failure, identical Pods are scheduled on other available Nodes in the cluster.</p>
</div>
<div class="col-md-4">
<div class="content__box content__box_lined">
<h3>Summary:</h3>
<ul>
<li>Pods</li>
<li>Nodes</li>
<li>Kubectl main commands</li>
</ul>
</div>
<div class="content__box content__box_fill">
<p><i>
A Pod is a group of one or more application containers (such as Docker or rkt) and includes shared storage (volumes), IP address and information about how to run them.
</i></p>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-8">
<h2 style="color: #3771e3;">Pods overview</h2>
</div>
</div>
<div class="row">
<div class="col-md-8">
<p><img src="./public/images/module_03_pods.svg"></p>
</div>
</div>
<br>
<div class="row">
<div class="col-md-8">
<h2>Nodes</h2>
<p>A Pod always runs on a <b>Node</b>. A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the Master. A Node can have multiple pods, and the Kubernetes master automatically handles scheduling the pods across the Nodes in the cluster. The Master's automatic scheduling takes into account the available resources on each Node.</p>
<p>Every Kubernetes Node runs at least:</p>
<ul>
<li>Kubelet, a process responsible for communication between the Kubernetes Master and the Nodes; it manages the Pods and the containers running on a machine.</li>
<li>A container runtime (like Docker, rkt) responsible for pulling the container image from a registry, unpacking the container, and running the application.</li>
</ul>
</div>
<div class="col-md-4">
<div class="content__box content__box_fill">
<p><i> Containers should only be scheduled together in a single Pod if they are tightly coupled and need to share resources such as disk. </i></p>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-8">
<h2 style="color: #3771e3;">Node overview</h2>
</div>
</div>
<div class="row">
<div class="col-md-8">
<p><img src="./public/images/module_03_nodes.svg"></p>
</div>
</div>
<br>
<div class="row">
<div class="col-md-8">
<h2>Troubleshooting with kubectl</h2>
<p>In Module <a href="2-0.html">2</a>, you used Kubectl command-line interface. You'll continue to use it in Module 3 to get information about deployed applications and their environments. The most common operations can be done with the following kubectl commands:</p>
<ul>
<li><b>kubectl get</b> - list resources</li>
<li><b>kubectl describe</b> - show detailed information about a resource</li>
<li><b>kubectl logs</b> - print the logs from a container in a pod</li>
<li><b>kubectl exec</b> - execute a command on a container in a pod</li>
</ul>
<p>You can use these commands to see when applications were deployed, what their current status is, where they are running and what their configuration is.</p>
<p>Now that we know more about our cluster components and the command line, let’s explore our application.</p>
</div>
<div class="col-md-4">
<div class="content__box content__box_fill">
<p><i> A node is a worker machine in Kubernetes and may be a VM or physical machine, depending on the cluster. Multiple Pods can run on one Node. </i></p>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-12">
<a class="btn btn-lg btn-success" href="3-2.html" role="button">Start Interactive Tutorial <span class="btn__next">›</span></a>
</div>
</div>
</main>
<!-- header start -->
<footer class="footer" role="contentinfo">
<div class="footer__content">
<ul class="footer__social">
<li class="footer__social-item">
<a class="footer__network" href="https://twitter.com/kubernetesio" target="_blank">
<i class="fa fa-twitter" aria-hidden="true"></i>
</a>
</li>
<li class="footer__social-item">
<a class="footer__network" href="https://github.com/kubernetes/kubernetes" target="_blank">
<i class="fa fa-github" aria-hidden="true"></i>
</a>
</li>
<li class="footer__social-item">
<a class="footer__network" href="https://groups.google.com/forum/#!forum/google-containers" target="_blank">
<i class="fa fa-envelope" aria-hidden="true"></i>
</a>
</li>
</ul>
<ul class="footer__menu">
<li class="footer__item">
<a class="footer__link" href="http://kubernetes.io/">Kubernetes</a>
</li>
<li class="footer__item">
<a class="footer__link" href="http://kubernetes.io/docs/">View Documentation</a>
</li>
<li class="footer__item">
<a class="footer__link" href="https://github.com/kubernetes/kubernetes">Github</a>
</li>
</ul>
<div class="footer__copyright">
<b>© 2016 Kubernetes</b><br>
developed and designed by<br>
<a href="http://container-solutions.com/" target="_blank">Container Solutions</a> & <a href="http://www.remembertoplay.co" target="_blank">Remember to Play</a>
</div>
</div>
</footer>
<!-- header finish --> <a class="scrolltop" href="#top"></a>
</div>
</body>
</html>