Kubernetes Best Practices
by Brendan Burns , Eddie Villalba , Dave Strebel , and Lachlan Evenson
Copyright 2020 Brendan Burns, Eddie Villalba, Dave Strebel, and Lachlan Evenson. All rights reserved.
Printed in the United States of America.
Published by OReilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
- Acquisitions Editor: John Devins
- Development Editor: Virginia Wilson
- Production Editor: Elizabeth Kelly
- Copyeditor: Charles Roumeliotis
- Proofreader: Sonia Saruba
- Indexer: WordCo Indexing Services, Inc.
- Interior Designer: David Futato
- Cover Designer: Karen Montgomery
- Illustrator: Rebecca Demarest
- November 2019: First Edition
Revision History for the First Release
- 2019-11-12: First Release
See https://www.oreilly.com/catalog/errata.csp?isbn=0636920273219 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. Kubernetes Best Practices, the cover image, and related trade dress are trademarks of OReilly Media, Inc.
The views expressed in this work are those of the authors, and do not represent the publishers views. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
978-1-492-05647-8
[LSI]
Preface
Who Should Read This Book
Kubernetes is the de facto standard for cloud native development. It is apowerful tool that can make your next application easier to develop,faster to deploy, and more reliable to operate. However, unlocking thepower of Kubernetes requires using it correctly. This book isintended for anyone who is deploying real-world applications to Kubernetesand is interested in learning patterns and practices they can applyto the applications that they build on top of Kubernetes.
Importantly, this book is not an introduction to Kubernetes. We assumethat you have a basic familiarity with the Kubernetes API and tools,and that you know how to create and interact with a Kubernetes cluster.If you are looking to learn Kubernetes, there are numerous great resourcesout there, such as Kubernetes: Up and Running (OReilly) that can give you anintroduction.
Instead, this book is a resource for anyone who wants to dive deep onhow to deploy specific applications and workloads on Kubernetes. Itshould be useful to you whether you are about to deploy your firstapplication onto Kubernetes or youve been using Kubernetes foryears.
Why We Wrote This Book
Between the four of us, we have significant experience helping a widevariety of users deploy their applications onto Kubernetes. Through thisexperience, we have seen where people struggle, and we have helped themfind their way to success. When sitting down to write this book, weattempted to capture these experiences so that many more people couldlearn by reading the lessons that we learned from these real-worldexperiences. Its our hope that by committing our experiences to writing,we can scale our knowledge and allow you to be successful deployingand managing your application on Kubernetes on your own.
Navigating This Book
Although you might read this book from cover to cover in a singlesitting, that is not really how we intended you to use it. Instead,we designed this book to be a collection of standalone chapters.Each chapter gives a complete overview of a particular task that youmight need to accomplish with Kubernetes. We expect people to diveinto the book to learn about a specific topic or interest, and then leave the book alone, only to return when a new topic comes up.
Despite this standalone approach, there are some themes that span the book. There are several chapters on developing applications on Kubernetes. covers deploying your application around the world.
There are also several chapters on cluster management, including).
Though it can be useful to read all of the chapters before you actually attempt the topic in the real world, our primary hope is that you will treat this book as a reference. It is intended as a guide as you put these topics to practice in the real world.
Conventions Used in This Book
The following typographical conventions are used in this book:
ItalicIndicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This element signifies a tip or suggestion.
Note
This element signifies a general note.
Warning
This element indicates a warning or caution.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is available for download at https://oreil.ly/KBPsample.
If you have a technical question or a problem using the code examples, please send email to .
This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.
We appreciate, but generally do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: Kubernetes Best Practices by Brendan Burns, Eddie Villalba, Dave Strebel, and Lachlan Evenson (OReilly). Copyright 2020 Brendan Burns, Eddie Villalba, Dave Strebel, and Lachlan Evenson, 978-1-492-05647-8.
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .
OReilly Online Learning
Note
For more than 40 years, OReilly Media has provided technology and business training, knowledge, and insight to help companies succeed.
Our unique network of experts and innovators share their knowledge and expertise through books, articles, conferences, and our online learning platform. OReillys online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from OReilly and 200+ other publishers. For more information, please visit