Acknowledgments |
|
xvii | |
Introduction |
|
xix | |
The Approach |
|
xix | |
Running Examples |
|
xx | |
What You Will Need |
|
xx | |
Run in the Cloud or Local |
|
xxi | |
Terminal Windows |
|
xxi | |
|
PART I MAKING AND USING CONTAINERS |
|
|
1 | (86) |
|
|
3 | (16) |
|
Modern Application Architecture |
|
|
4 | (3) |
|
|
4 | (1) |
|
|
5 | (1) |
|
Attribute: Microservice-Based |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (2) |
|
Requirements for Containers |
|
|
8 | (1) |
|
Requirements for Orchestration |
|
|
8 | (1) |
|
|
9 | (5) |
|
What Containers Look Like |
|
|
9 | (3) |
|
What Containers Really Are |
|
|
12 | (2) |
|
Deploying Containers to Kubernetes |
|
|
14 | (3) |
|
Talking to the Kubernetes Cluster |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
17 | (2) |
|
|
19 | (14) |
|
|
20 | (3) |
|
Why Processes Need Isolation |
|
|
20 | (1) |
|
File Permissions and Change Root |
|
|
20 | (2) |
|
|
22 | (1) |
|
Container Platforms and Container Runtimes |
|
|
23 | (7) |
|
|
23 | (1) |
|
|
24 | (1) |
|
Introducing Linux Namespaces |
|
|
25 | (1) |
|
Containers and Namespaces in CRI-O |
|
|
26 | (4) |
|
Running Processes in Namespaces Directly |
|
|
30 | (2) |
|
|
32 | (1) |
|
|
33 | (18) |
|
|
34 | (3) |
|
Real-Time and Non-Real-Time Policies |
|
|
34 | (1) |
|
Setting Process Priorities |
|
|
35 | (2) |
|
|
37 | (6) |
|
|
39 | (2) |
|
CPU Quota with CRI-O and crictl |
|
|
41 | (2) |
|
|
43 | (4) |
|
|
47 | (2) |
|
|
49 | (2) |
|
|
51 | (18) |
|
|
52 | (3) |
|
|
55 | (5) |
|
Inspecting Network Namespaces |
|
|
55 | (2) |
|
Creating Network Namespaces |
|
|
57 | (3) |
|
|
60 | (4) |
|
Adding Interfaces to a Bridge |
|
|
61 | (1) |
|
|
62 | (2) |
|
|
64 | (3) |
|
|
67 | (2) |
|
5 Container Images And Runtime Layers |
|
|
69 | (18) |
|
|
70 | (4) |
|
|
70 | (2) |
|
Image Versions and Layers |
|
|
72 | (2) |
|
Building Container Images |
|
|
74 | (4) |
|
|
74 | (2) |
|
Tagging and Publishing Images |
|
|
76 | (2) |
|
Image and Container Storage |
|
|
78 | (4) |
|
|
78 | (2) |
|
Understanding Container Layers |
|
|
80 | (1) |
|
Practical Image Building Advice |
|
|
81 | (1) |
|
Open Container Initiative |
|
|
82 | (2) |
|
|
84 | (3) |
|
PART II CONTAINERS IN KUBERNETES |
|
|
|
|
87 | (24) |
|
Running Containers in a Cluster |
|
|
88 | (2) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
90 | (10) |
|
|
91 | (1) |
|
|
92 | (2) |
|
|
94 | (3) |
|
Joining Nodes to the Cluster |
|
|
97 | (3) |
|
Installing Cluster Add-ons |
|
|
100 | (5) |
|
|
100 | (2) |
|
|
102 | (1) |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
105 | (4) |
|
|
109 | (2) |
|
7 Deploying Containers To Kubernetes |
|
|
111 | (18) |
|
|
111 | (4) |
|
|
112 | (2) |
|
|
114 | (1) |
|
|
115 | (7) |
|
|
115 | (4) |
|
|
119 | (1) |
|
|
120 | (2) |
|
|
122 | (6) |
|
|
122 | (2) |
|
|
124 | (3) |
|
|
127 | (1) |
|
|
128 | (1) |
|
|
129 | (22) |
|
|
130 | (4) |
|
|
130 | (1) |
|
|
131 | (3) |
|
|
134 | (10) |
|
|
135 | (4) |
|
|
139 | (5) |
|
Choosing a Network Plug-in |
|
|
144 | (1) |
|
|
144 | (5) |
|
|
149 | (2) |
|
9 Service And Ingress Networks |
|
|
151 | (16) |
|
|
152 | (8) |
|
|
153 | (2) |
|
|
155 | (1) |
|
Name Resolution and Namespaces |
|
|
156 | (2) |
|
|
158 | (2) |
|
|
160 | (6) |
|
|
161 | (1) |
|
|
162 | (3) |
|
|
165 | (1) |
|
|
166 | (1) |
|
|
167 | (20) |
|
|
167 | (6) |
|
|
168 | (2) |
|
|
170 | (3) |
|
|
173 | (3) |
|
|
176 | (9) |
|
|
177 | (2) |
|
|
179 | (4) |
|
Debugging Using Port Forwarding |
|
|
183 | (2) |
|
|
185 | (2) |
|
11 Control Plane And Access Control |
|
|
187 | (18) |
|
|
188 | (2) |
|
API Server Authentication |
|
|
190 | (5) |
|
|
190 | (2) |
|
|
192 | (2) |
|
|
194 | (1) |
|
Role-Based Access Controls |
|
|
195 | (8) |
|
|
195 | (2) |
|
Role Bindings and Cluster Role Bindings |
|
|
197 | (1) |
|
Assigning a Service Account to Pods |
|
|
198 | (3) |
|
|
201 | (2) |
|
|
203 | (2) |
|
|
205 | (14) |
|
|
205 | (5) |
|
Kubelet Cluster Configuration |
|
|
207 | (1) |
|
Kubelet Container Runtime Configuration |
|
|
208 | (1) |
|
Kubelet Network Configuration |
|
|
209 | (1) |
|
|
210 | (2) |
|
|
212 | (6) |
|
Node Draining and Cordoning |
|
|
212 | (2) |
|
|
214 | (2) |
|
|
216 | (2) |
|
|
218 | (1) |
|
|
219 | (14) |
|
|
220 | (1) |
|
|
220 | (6) |
|
|
220 | (3) |
|
|
223 | (2) |
|
|
225 | (1) |
|
|
226 | (2) |
|
|
228 | (4) |
|
|
232 | (1) |
|
|
233 | (16) |
|
|
234 | (9) |
|
Processing and Memory Limits |
|
|
234 | (2) |
|
|
236 | (2) |
|
|
238 | (5) |
|
|
243 | (5) |
|
|
248 | (1) |
|
|
249 | (16) |
|
|
249 | (3) |
|
|
250 | (1) |
|
|
251 | (1) |
|
|
252 | (12) |
|
|
252 | (4) |
|
|
256 | (3) |
|
|
259 | (3) |
|
|
262 | (2) |
|
|
264 | (1) |
|
16 Configuration And Secrets |
|
|
265 | (14) |
|
|
265 | (7) |
|
Externalizing Configuration |
|
|
267 | (2) |
|
|
269 | (3) |
|
|
272 | (2) |
|
Cluster Configuration Repository |
|
|
274 | (4) |
|
|
275 | (1) |
|
|
276 | (2) |
|
|
278 | (1) |
|
17 Custom Resources And Operators |
|
|
279 | (16) |
|
|
280 | (8) |
|
|
281 | (3) |
|
|
284 | (4) |
|
|
288 | (4) |
|
|
292 | (3) |
|
PART III PERFORMANT KUBERNETES |
|
|
|
|
295 | (14) |
|
Affinity and Anti-affinity |
|
|
296 | (5) |
|
|
297 | (2) |
|
|
299 | (2) |
|
|
301 | (2) |
|
|
303 | (3) |
|
|
306 | (3) |
|
19 Tuning Quality Of Service |
|
|
309 | (14) |
|
|
310 | (1) |
|
Quality of Service Classes |
|
|
310 | (7) |
|
|
311 | (1) |
|
|
312 | (2) |
|
|
314 | (1) |
|
|
315 | (1) |
|
|
316 | (1) |
|
|
317 | (4) |
|
|
321 | (2) |
|
20 Application Resiliency |
|
|
323 | (22) |
|
Example Application Stack |
|
|
324 | (8) |
|
|
324 | (2) |
|
|
326 | (3) |
|
|
329 | (1) |
|
|
330 | (2) |
|
Application and Cluster Monitoring |
|
|
332 | (11) |
|
|
333 | (1) |
|
Deploying kube-prometheus |
|
|
334 | (3) |
|
|
337 | (2) |
|
Adding Monitoring for Services |
|
|
339 | (4) |
|
|
343 | (2) |
Index |
|
345 | |