ebook img

The Book of Kubernetes PDF

385 Pages·5.923 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview The Book of Kubernetes

CONTROL, OPTIMIZE, T H E B O O K O F AND TROUBLESHOOT YOUR CONTAINERS T K U B E R N E T E S H E B A C O M P L E T E G U I D E T O Linux containers make it easy to package, deploy, • Detect and recover from failures, schedule the C O N T A I N E R O R C H E S T R A T I O N and scale your applications, but the process of deployment of new containers, and confi gure O doing so is not without mystery. In The Book of network routing O Kubernetes, you’ll explore the inner workings of the • Extend a Kubernetes cluster to add new features Kubernetes system and learn how to leverage it to such as automating the deployment of a highly K A L A N H O H N build performant, reliable, and resilient cloud-native available database engine applications that handle failure gracefully. Regardless of your experience, whether you’re O You’ll learn how containers use namespaces to isolate a software developer or a sysadmin type, this F processes and how they leverage resource limiting comprehensive guide will show you how to master the to guarantee a process uses only its allocated CPU, art of containerizing complex applications and make K memory, and network resources. You’ll install a them more reliable. Kubernetes cluster, deploy containers to it, and explore U ABOUT THE AUTHOR how packets fl ow between containers across the host network. Finally, you’ll learn how to schedule and run Alan Hohn is the director for software strategy B containers to maximize performance, identify potential at Lockheed Martin with 25 years of experience as E problems, and fi x them. a software developer and systems architect. Hohn is also a Kubernetes and DevOps trainer and has R You’ll also learn how to: a degree in CS from Embry-Riddle Aeronautical N University and an MS in industrial engineering from • Make applications more performant with the Georgia Institute of Technology. autoscaling, dynamic discovery, and load balancing E • Confi gure server authentication and role-based Covers: Kubernetes version 1.2x T access control E S THE FINEST IN GEEK ENTERTAINMENT™ THwEw FwIN.nEoSsTt aINrc hG.EcEoKm ENTERTAINMENT™ HO nostarch.com $59.99 ($78.99 CDN) H N FSC FPO “I LIE FLAT.” This book uses a durable binding that won’t snap shut THE BOOK OF KUBERNETES T H E B O O K O F K U B E R N E T E S A Complete Guide to Container Orchestration by Alan Hohn SanFrancisco THE BOOK OF KUBERNETES. Copyright © 2022 by Alan Hohn. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. First printing 26 25 24 23 22 1 2 3 4 5 ISBN­13: 978­1­7185­0264­2 (print) ISBN­13: 978­1­7185­0265­9 (ebook) Publisher: William Pollock Managing Editor: Jill Franklin Production Manager: Rachel Monaghan Production Editors: Paula Williamson and Jennifer Kepler Developmental Editor: Jill Franklin Cover Illustrator: Gina Redman Interior Design: Octopod Studios Technical Reviewer: Xander Soldaat Production Services: Octal Publishing, Inc. For information on distribution, bulk sales, corporate sales, or translations, please contact No Starch Press, Inc. directly at [email protected] or: No Starch Press, Inc. 245 8th Street, San Francisco, CA 94103 phone: 1.415.863.9900 www.nostarch.com Library of Congress Control Number: 2022020536 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the infor­ mation contained in it. Formywife,Sheryl About the Author AlanHohnisthedirectorforsoftwarestrategyforLockheedMartin. He has25yearsofexperienceasaLockheedMartinFellow,softwaredeveloper, architect,lead,andmanager. Hehasdeliveredrealapplicationstoproduc­ tioninAda,Java,Python,andGo,amongothers,andhasworkedwithLinux sincetheearly1990s. HeisanAgileandDevSecOpscoachandisanexperi­ encedtrainerforJava,Ansible,containers,softwarearchitecture,andKuber­ netes. AlanhasadegreeincomputersciencefromEmbry­RiddleAeronau­ ticalUniversity,amaster’sinbusinessadministrationfromtheUniversityof Minnesota,andamaster’sinindustrialengineeringfromtheGeorgiaInsti­ tuteofTechnology. About the Technical Reviewer XanderSoldaatstartedhisLinuxjourneybackin1994withasportsbagfull offloppydisks,a486DX2/66,andaspareweekend. Hehasadeepback­ groundinITinfrastructurearchitecture,aswellasembeddedsystems,com­ piler,andSTEMcurriculumdevelopment. HeiscurrentlyanOpenShift CloudSuccessArchitectatRedHat. Inhissparetime,helikestotinkerwith robots,electronics,retrocomputers,andtabletopgames. BRIEF CONTENTS Acknowledgments .................................................................. xvii Introduction........................................................................ xix PARTI:MAKINGANDUSINGCONTAINERS Chapter1:WhyContainersMatter................................................... 3 Chapter2:ProcessIsolation ......................................................... 19 Chapter3:ResourceLimiting ........................................................ 33 Chapter4:NetworkNamespaces.................................................... 51 Chapter5:ContainerImagesandRuntimeLayers...................................... 69 PARTII:CONTAINERSINKUBERNETES Chapter6:WhyKubernetesMatters.................................................. 87 Chapter7:DeployingContainerstoKubernetes ....................................... 111 Chapter8:OverlayNetworks ....................................................... 129 Chapter9:ServiceandIngressNetworks ............................................. 151 Chapter10:WhenThingsGoWrong ................................................ 167 Chapter11:ControlPlaneandAccessControl ........................................ 187 Chapter12:ContainerRuntime ...................................................... 205 Chapter13:HealthProbes .......................................................... 219 Chapter14:LimitsandQuotas....................................................... 233 Chapter15:PersistentStorage....................................................... 249 Chapter16:ConfigurationandSecrets ............................................... 265 Chapter17:CustomResourcesandOperators......................................... 279 PARTIII:PERFORMANTKUBERNETES Chapter18:AffinityandDevices..................................................... 295 Chapter19:TuningQualityofService................................................ 309 Chapter20:ApplicationResiliency................................................... 323 Index.............................................................................. 345

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.