About the Author |
|
xvii | |
About the Technical Reviewer |
|
xix | |
Foreword |
|
xxi | |
|
|
1 | (94) |
|
Chapter 1 Installing Kubernetes Using Docker |
|
|
3 | (36) |
|
|
4 | (1) |
|
|
5 | (10) |
|
|
15 | (8) |
|
|
23 | (2) |
|
Starting Kubernetes Master |
|
|
25 | (3) |
|
|
28 | (1) |
|
Listing the Kubernetes Docker Containers |
|
|
29 | (3) |
|
|
32 | (3) |
|
|
35 | (1) |
|
|
36 | (1) |
|
Testing the Kubernetes Installation |
|
|
36 | (2) |
|
|
38 | (1) |
|
Chapter 2 Hello Kubernetes |
|
|
39 | (38) |
|
|
39 | (3) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
What Is a Replication Controller? |
|
|
40 | (1) |
|
|
41 | (1) |
|
|
41 | (1) |
|
|
41 | (1) |
|
|
41 | (1) |
|
|
41 | (1) |
|
|
41 | (1) |
|
|
42 | (1) |
|
Creating an Application Imperatively |
|
|
43 | (10) |
|
|
44 | (2) |
|
|
46 | (1) |
|
Invoking the Hello-World Application |
|
|
47 | (1) |
|
|
48 | (4) |
|
Deleting a Replication Controller |
|
|
52 | (1) |
|
|
53 | (1) |
|
Creating an Application Declaratively |
|
|
53 | (17) |
|
Creating a Pod Definition |
|
|
54 | (4) |
|
Creating a Service Definition |
|
|
58 | (3) |
|
Creating a Replication Controller Definition |
|
|
61 | (3) |
|
Invoking the Hello-World Application |
|
|
64 | (4) |
|
|
68 | (2) |
|
Using JSON for the Resource Definitions |
|
|
70 | (6) |
|
|
76 | (1) |
|
Chapter 3 Using Custom Commands and Environment Variables |
|
|
77 | (18) |
|
|
77 | (1) |
|
The ENTRYPOINT and CMD Instructions |
|
|
78 | (1) |
|
The Command and Args Fields in a Pod Definition |
|
|
79 | (1) |
|
|
80 | (1) |
|
Using the Default ENTRYPOINT and CMD from a Docker Image |
|
|
81 | (3) |
|
Overriding Both the ENTRYPOINT and CMD |
|
|
84 | (3) |
|
Specifying both the Executable and the Parameters in the Command Mapping |
|
|
87 | (3) |
|
Specifying Both the Executable and the Parameters in the Args Mapping |
|
|
90 | (3) |
|
|
93 | (2) |
|
Part II Relational Databases |
|
|
95 | (70) |
|
Chapter 4 Using MySQL Database |
|
|
97 | (18) |
|
|
97 | (2) |
|
|
99 | (1) |
|
Creating a Replication Controller |
|
|
100 | (4) |
|
|
104 | (1) |
|
|
104 | (2) |
|
|
106 | (1) |
|
Starting an Interactive Shell |
|
|
107 | (2) |
|
|
109 | (1) |
|
Creating a Database Table |
|
|
110 | (1) |
|
Exiting the MySQL CLI and Interactive Shell |
|
|
111 | (1) |
|
|
111 | (2) |
|
Deleting the Replication Controller |
|
|
113 | (1) |
|
|
114 | (1) |
|
Chapter 5 Using PostgreSQL Database |
|
|
115 | (26) |
|
|
115 | (2) |
|
Creating a PostgreSQL Cluster Declaratively |
|
|
117 | (14) |
|
|
117 | (2) |
|
Creating a Replication Controller |
|
|
119 | (4) |
|
|
123 | (1) |
|
Starting an Interactive Command Shell |
|
|
123 | (1) |
|
Starting the PostgreSQL SQL Terminal |
|
|
124 | (1) |
|
Creating a Database Table |
|
|
125 | (1) |
|
Exiting the Interactive Command Shell |
|
|
126 | (1) |
|
Scaling the PostgreSQL Cluster |
|
|
127 | (1) |
|
|
128 | (2) |
|
Deleting the Replication Controller |
|
|
130 | (1) |
|
|
131 | (1) |
|
Creating a PostgreSQL Cluster Imperatively |
|
|
131 | (8) |
|
Creating a Replication Controller |
|
|
132 | (1) |
|
|
132 | (1) |
|
|
133 | (1) |
|
Creating a Database Table |
|
|
134 | (3) |
|
Scaling the PostgreSQL Cluster |
|
|
137 | (1) |
|
Deleting the Replication Controller |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
139 | (2) |
|
Chapter 6 Using Oracle Database |
|
|
141 | (24) |
|
|
141 | (1) |
|
Creating an Oracle Database Instance Imperatively |
|
|
142 | (6) |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
146 | (1) |
|
Deleting the Replication Controller and Service |
|
|
147 | (1) |
|
Creating an Oracle Database Instance Declaratively |
|
|
148 | (15) |
|
|
148 | (2) |
|
|
150 | (3) |
|
Creating a Replication Controller |
|
|
153 | (3) |
|
Keeping the Replication Level |
|
|
156 | (2) |
|
|
158 | (1) |
|
Starting the Interactive Shell |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
161 | (1) |
|
Creating a Database Table |
|
|
162 | (1) |
|
Exiting the Interactive Shell |
|
|
163 | (1) |
|
|
163 | (2) |
|
|
165 | (110) |
|
Chapter 7 Using MongoDB Database |
|
|
167 | (34) |
|
|
167 | (2) |
|
Creating a MongoDB Cluster Declaratively |
|
|
169 | (25) |
|
|
169 | (4) |
|
Creating a Replication Controller |
|
|
173 | (3) |
|
|
176 | (2) |
|
|
178 | (2) |
|
Starting the Interactive Shell for Docker Container |
|
|
180 | (2) |
|
|
182 | (1) |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
184 | (2) |
|
|
186 | (1) |
|
Finding a Single Document |
|
|
186 | (1) |
|
Finding Specific Fields in a Single Document |
|
|
187 | (1) |
|
|
188 | (1) |
|
Exiting Mongo Shell and Interactive Shell |
|
|
188 | (1) |
|
|
188 | (1) |
|
Deleting the Replication Controller |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
190 | (4) |
|
Creating a MongoDB Cluster Imperatively |
|
|
194 | (6) |
|
Creating a Replication Controller |
|
|
194 | (1) |
|
|
195 | (1) |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
198 | (2) |
|
Deleting the Service and Replication Controller |
|
|
200 | (1) |
|
|
200 | (1) |
|
Chapter 8 Using Apache Cassandra Database |
|
|
201 | (30) |
|
|
201 | (2) |
|
Creating a Cassandra Cluster Declaratively |
|
|
203 | (22) |
|
|
203 | (3) |
|
Creating a Replication Controller |
|
|
206 | (5) |
|
|
211 | (1) |
|
|
212 | (1) |
|
Starting an Interactive Shell |
|
|
213 | (2) |
|
|
215 | (1) |
|
|
215 | (1) |
|
|
215 | (1) |
|
|
216 | (1) |
|
|
216 | (1) |
|
|
217 | (1) |
|
|
218 | (1) |
|
Dropping a Table and Keyspace |
|
|
218 | (1) |
|
|
219 | (6) |
|
Creating a Cassandra Cluster Imperatively |
|
|
225 | (5) |
|
Creating a Replication Controller |
|
|
225 | (2) |
|
|
227 | (1) |
|
|
228 | (1) |
|
Deleting the Replication Controller and Service |
|
|
229 | (1) |
|
|
230 | (1) |
|
Chapter 9 Using Couchbase |
|
|
231 | (44) |
|
|
231 | (3) |
|
Creating a Couchbase Cluster Declaratively |
|
|
234 | (32) |
|
|
234 | (3) |
|
|
237 | (2) |
|
Creating a Replication Controller |
|
|
239 | (4) |
|
|
243 | (1) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
244 | (1) |
|
|
244 | (2) |
|
Logging into Couchbase Web Console |
|
|
246 | (1) |
|
Configuring Couchbase Server |
|
|
247 | (8) |
|
|
255 | (9) |
|
Starting an Interactive Shell |
|
|
264 | (1) |
|
Using the cbtransfer Tool |
|
|
265 | (1) |
|
Creating a Couchbase Cluster Imperatively |
|
|
266 | (7) |
|
Creating a Replication Controller |
|
|
266 | (1) |
|
|
266 | (2) |
|
|
268 | (1) |
|
|
269 | (1) |
|
Keeping the Replication Level |
|
|
270 | (2) |
|
|
272 | (1) |
|
Logging in to Couchbase Admin Console |
|
|
272 | (1) |
|
|
273 | (2) |
|
Part IV Apache Hadoop Ecosystem |
|
|
275 | (98) |
|
Chapter 10 Using Apache Hadoop Ecosystem |
|
|
277 | (36) |
|
|
277 | (1) |
|
Creating an Apache Hadoop Cluster Declaratively |
|
|
278 | (18) |
|
|
279 | (2) |
|
Creating a Replication Controller |
|
|
281 | (2) |
|
|
283 | (1) |
|
|
284 | (1) |
|
|
285 | (1) |
|
Starting an Interactive Shell |
|
|
286 | (1) |
|
Running a MapReduce Application |
|
|
287 | (9) |
|
|
296 | (6) |
|
|
302 | (5) |
|
Deleting the Replication Controller and Service |
|
|
307 | (1) |
|
Creating an Apache Hadoop Cluster Imperatively |
|
|
307 | (4) |
|
Creating a Replication Controller |
|
|
307 | (1) |
|
|
308 | (1) |
|
|
309 | (1) |
|
|
309 | (1) |
|
Starting an Interactive Shell |
|
|
310 | (1) |
|
|
311 | (2) |
|
Chapter 11 Using Apache Solr |
|
|
313 | (34) |
|
|
314 | (1) |
|
|
315 | (2) |
|
Listing Service Endpoints |
|
|
317 | (1) |
|
|
317 | (1) |
|
Creating a Replication Controller |
|
|
318 | (3) |
|
|
321 | (1) |
|
Describing a Replication Controller |
|
|
322 | (1) |
|
|
323 | (2) |
|
Starting an Interactive Shell |
|
|
325 | (3) |
|
|
328 | (1) |
|
|
329 | (3) |
|
Accessing Solr on Command Line with a REST Client |
|
|
332 | (5) |
|
|
337 | (1) |
|
Accessing Solr in Admin Console |
|
|
338 | (6) |
|
|
344 | (1) |
|
|
345 | (2) |
|
Chapter 12 Using Apache Kafka |
|
|
347 | (26) |
|
|
348 | (1) |
|
Modifying the Docker Image |
|
|
349 | (6) |
|
|
355 | (3) |
|
Creating a Replication Controller |
|
|
358 | (3) |
|
|
361 | (1) |
|
|
362 | (1) |
|
Starting an Interactive Shell |
|
|
363 | (1) |
|
Starting the Kafka Server |
|
|
364 | (2) |
|
|
366 | (1) |
|
Starting a Kafka Producer |
|
|
367 | (1) |
|
Starting a Kafka Consumer |
|
|
367 | (1) |
|
Producing and Consuming Messages |
|
|
367 | (1) |
|
|
368 | (2) |
|
Deleting Replication Controller and Service |
|
|
370 | (1) |
|
|
371 | (2) |
|
Part V Multi Containers and Nodes |
|
|
373 | (56) |
|
Chapter 13 Creating a Multi-Container Pod |
|
|
375 | (24) |
|
How to find Number of Containers in a Pod? |
|
|
376 | (1) |
|
Types of Applications Using a Multi-Container Pod |
|
|
376 | (1) |
|
|
377 | (1) |
|
|
378 | (1) |
|
|
379 | (1) |
|
Creating a Replication Container |
|
|
380 | (2) |
|
|
382 | (1) |
|
Listing the Docker Containers |
|
|
383 | (1) |
|
Describing the Service after Creating Replication Controller |
|
|
384 | (1) |
|
Invoking the Hello World Application on Command Line |
|
|
385 | (1) |
|
Starting the Interactive Shell |
|
|
386 | (1) |
|
Starting PostgreSQL Shell |
|
|
387 | (1) |
|
|
387 | (1) |
|
Opening the Hello World Application in a Browser |
|
|
388 | (1) |
|
|
389 | (8) |
|
Listing the Docker Containers |
|
|
391 | (1) |
|
Describing the Service after Scaling |
|
|
392 | (1) |
|
|
392 | (1) |
|
Opening the Hello World Application in a Browser |
|
|
393 | (1) |
|
Invoking the Hello World Application from Command Line |
|
|
394 | (2) |
|
Deleting the Replication Controller |
|
|
396 | (1) |
|
|
397 | (1) |
|
|
397 | (2) |
|
Chapter 14 Installing Kubernetes on a Multi-Node Cluster |
|
|
399 | (30) |
|
Components of a Multi-Node Cluster |
|
|
400 | (1) |
|
|
400 | (2) |
|
Installing the Master Node |
|
|
402 | (10) |
|
Setting Up Flanneld and etcd |
|
|
402 | (7) |
|
Starting the Kubernetes Master |
|
|
409 | (2) |
|
Running the Service Proxy |
|
|
411 | (1) |
|
Testing the One-Node Cluster |
|
|
412 | (1) |
|
|
412 | (7) |
|
|
412 | (1) |
|
|
413 | (5) |
|
Starting Up Kubernetes on Worker Node |
|
|
418 | (1) |
|
Running the Service Proxy |
|
|
419 | (1) |
|
Testing the Kubernetes Cluster |
|
|
419 | (1) |
|
Running an Application on the Cluster |
|
|
419 | (1) |
|
Exposing the Application as a Service |
|
|
420 | (2) |
|
Testing the Application in a Browser |
|
|
422 | (1) |
|
|
423 | (4) |
|
|
427 | (2) |
Index |
|
429 | |