Ion Ond Kubernetes - WordPress

2y ago
76 Views
5 Downloads
2.81 MB
277 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Isobel Thacker
Transcription

ndco ionSe ditEKubernetesUp & RunningDive into the Future of InfrastructureBrendan Burns,Joe Beda & Kelsey Hightower

Get startedKuberneteson AzureFind out what you can do with a fully managedservice for simplifying Kubernetes deployment,management and operations, including: Build microservices applications. Deploy a Kubernetes cluster. Easily monitor and manage Kubernetes.Create a free account and get started withKubernetes on Azure. Azure Kubernetes Service(AKS) is one of more than 25 products that arealways free with your account. Start free Then, try these labs to master the basic andadvanced tasks required to deploy a multicontainer application to Kubernetes on AzureKubernetes Service (AKS). Try now

SECOND EDITIONKubernetes: Up and RunningDive into the Future of InfrastructureBrendan Burns, Joe Beda, and Kelsey HightowerBeijingBoston Farnham SebastopolTokyo

Kubernetes: Up and Runningby Brendan Burns, Joe Beda, and Kelsey HightowerCopyright 2019 Brendan Burns, Joe Beda, and Kelsey Hightower. All rights reserved.Printed in the United States of America.Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions arealso available for most titles (http://oreilly.com). For more information, contact our corporate/institutionalsales department: 800-998-9938 or corporate@oreilly.com.Acquisition Editor: John DevinsDevelopment Editor: Virginia WilsonProduction Editor: Kristen BrownCopyeditor: Kim CoferProofreader: Rachel HeadSeptember 2017:August 2019:Indexer: Ellen Troutman-ZaigInterior Designer: David FutatoCover Designer: Karen MontgomeryIllustrator: Rebecca DemarestFirst EditionSecond EditionRevision History for the Second Edition2019-07-15:First ReleaseSee http://oreilly.com/catalog/errata.csp?isbn 9781492046530 for release details.The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Kubernetes: Up and Running, the coverimage, and related trade dress are trademarks of O’Reilly Media, Inc.The views expressed in this work are those of the authors, and do not represent the publisher’s views.While the publisher and the authors have used good faith efforts to ensure that the information andinstructions contained in this work are accurate, the publisher and the authors disclaim all responsibilityfor errors or omissions, including without limitation responsibility for damages resulting from the use ofor reliance on this work. Use of the information and instructions contained in this work is at your ownrisk. If any code samples or other technology this work contains or describes is subject to open sourcelicenses or the intellectual property rights of others, it is your responsibility to ensure that your usethereof complies with such licenses and/or rights.This work is part of a collaboration between O’Reilly and Microsoft. See our statement of editorial inde‐pendence.978-1-492-04653-0[LSI]

For Robin, Julia, Ethan, and everyone who bought cookies to pay for that Commodore64 in my third-grade class.—Brendan BurnsFor my Dad, who helped me fall in love with computers by bringing home punch cardsand dot matrix banners.—Joe BedaFor Klarissa and Kelis, who keep me sane. And for my Mom, who taught me a strongwork ethic and how to rise above all odds.—Kelsey Hightower

Table of ContentsPreface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1VelocityThe Value of ImmutabilityDeclarative ConfigurationSelf-Healing SystemsScaling Your Service and Your TeamsDecouplingEasy Scaling for Applications and ClustersScaling Development Teams with MicroservicesSeparation of Concerns for Consistency and ScalingAbstracting Your InfrastructureEfficiencySummary234556678910112. Creating and Running Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Container ImagesThe Docker Image FormatBuilding Application Images with DockerDockerfilesOptimizing Image SizesImage SecurityMultistage Image BuildsStoring Images in a Remote RegistryThe Docker Container RuntimeRunning Containers with DockerExploring the kuard Application1415161618192022232323v

Limiting Resource UsageCleanupSummary2424253. Deploying a Kubernetes Cluster. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Installing Kubernetes on a Public Cloud ProviderGoogle Kubernetes EngineInstalling Kubernetes with Azure Kubernetes ServiceInstalling Kubernetes on Amazon Web ServicesInstalling Kubernetes Locally Using minikubeRunning Kubernetes in DockerRunning Kubernetes on Raspberry PiThe Kubernetes ClientChecking Cluster StatusListing Kubernetes Worker NodesCluster ComponentsKubernetes ProxyKubernetes DNSKubernetes UISummary2828282929303131313234343435364. Common kubectl Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37NamespacesContextsViewing Kubernetes API ObjectsCreating, Updating, and Destroying Kubernetes ObjectsLabeling and Annotating ObjectsDebugging CommandsCommand AutocompletionAlternative Ways of Viewing Your ClusterSummary3737383940404242435. Pods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Pods in KubernetesThinking with PodsThe Pod ManifestCreating a PodCreating a Pod ManifestRunning PodsListing PodsPod DetailsDeleting a Podvi Table of Contents464647484849495051

Accessing Your PodUsing Port ForwardingGetting More Info with LogsRunning Commands in Your Container with execCopying Files to and from ContainersHealth ChecksLiveness ProbeReadiness ProbeTypes of Health ChecksResource ManagementResource Requests: Minimum Required ResourcesCapping Resource Usage with LimitsPersisting Data with VolumesUsing Volumes with PodsDifferent Ways of Using Volumes with PodsPersisting Data Using Remote DisksPutting It All 36. Labels and Annotations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65LabelsApplying LabelsModifying LabelsLabel SelectorsLabel Selectors in API ObjectsLabels in the Kubernetes ArchitectureAnnotationsDefining AnnotationsCleanupSummary656768687071717273737. Service Discovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75What Is Service Discovery?The Service ObjectService DNSReadiness ChecksLooking Beyond the ClusterCloud IntegrationAdvanced DetailsEndpointsManual Service Discoverykube-proxy and Cluster IPs75767778798182828384Table of Contents vii

Cluster IP Environment VariablesConnecting with Other EnvironmentsCleanupSummary858686868. HTTP Load Balancing with Ingress. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Ingress Spec Versus Ingress ControllersInstalling ContourConfiguring DNSConfiguring a Local hosts FileUsing IngressSimplest UsageUsing HostnamesUsing PathsCleaning UpAdvanced Ingress Topics and GotchasRunning Multiple Ingress ControllersMultiple Ingress ObjectsIngress and NamespacesPath RewritingServing TLSAlternate Ingress ImplementationsThe Future of 019. ReplicaSets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Reconciliation LoopsRelating Pods and ReplicaSetsAdopting Existing ContainersQuarantining ContainersDesigning with ReplicaSetsReplicaSet SpecPod TemplatesLabelsCreating a ReplicaSetInspecting a ReplicaSetFinding a ReplicaSet from a PodFinding a Set of Pods for a ReplicaSetScaling ReplicaSetsImperative Scaling with kubectl scaleDeclaratively Scaling with kubectl applyAutoscaling a ReplicaSetviii Table of 109110

Deleting ReplicaSetsSummary11111210. Deployments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Your First DeploymentDeployment InternalsCreating DeploymentsManaging DeploymentsUpdating DeploymentsScaling a DeploymentUpdating a Container ImageRollout HistoryDeployment StrategiesRecreate StrategyRollingUpdate StrategySlowing Rollouts to Ensure Service HealthDeleting a DeploymentMonitoring a 12612812812911. DaemonSets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131DaemonSet SchedulerCreating DaemonSetsLimiting DaemonSets to Specific NodesAdding Labels to NodesNode SelectorsUpdating a DaemonSetRolling Update of a DaemonSetDeleting a DaemonSetSummary13213213413513513613613713812. Jobs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139The Job ObjectJob PatternsOne ShotParallelismWork QueuesCronJobsSummary13914014014414615015113. ConfigMaps and Secrets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153ConfigMaps153Table of Contents ix

Creating ConfigMapsUsing a ConfigMapSecretsCreating SecretsConsuming SecretsPrivate Docker RegistriesNaming ConstraintsManaging ConfigMaps and 5916016116216216316316514. Role-Based Access Control for Kubernetes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Role-Based Access ControlIdentity in KubernetesUnderstanding Roles and Role BindingsRoles and Role Bindings in KubernetesTechniques for Managing RBACTesting Authorization with can-iManaging RBAC in Source ControlAdvanced TopicsAggregating ClusterRolesUsing Groups for . Integrating Storage Solutions and Kubernetes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177Importing External ServicesServices Without SelectorsLimitations of External Services: Health CheckingRunning Reliable SingletonsRunning a MySQL SingletonDynamic Volume ProvisioningKubernetes-Native Storage with StatefulSetsProperties of StatefulSetsManually Replicated MongoDB with StatefulSetsAutomating MongoDB Cluster CreationPersistent Volumes and StatefulSetsOne Final Thing: Readiness ProbesSummaryx Table of Contents178179181181181185186187187189192193194

16. Extending Kubernetes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195What It Means to Extend KubernetesPoints of ExtensibilityPatterns for Custom ResourcesJust DataCompilersOperatorsGetting StartedSummary19519620420420520520520517. Deploying Real-World Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207JupyterParsePrerequisitesBuilding the parse-serverDeploying the parse-serverTesting ParseGhostConfiguring GhostRedisConfiguring RedisCreating a Redis ServiceDeploying RedisPlaying with Our Redis 21821918. Organizing Your Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221Principles to Guide UsFilesystems as the Source of TruthThe Role of Code ReviewFeature Gates and GuardsManaging Your Application in Source ControlFilesystem LayoutManaging Periodic VersionsStructuring Your Application for Development, Testing, and DeploymentGoalsProgression of a ReleaseParameterizing Your Application with TemplatesParameterizing with Helm and TemplatesFilesystem Layout for ParameterizationDeploying Your Application Around the WorldArchitectures for Worldwide DeploymentTable of 230 xi

Implementing Worldwide DeploymentDashboards and Monitoring for Worldwide DeploymentsSummary232233233A. Building a Raspberry Pi Kubernetes Cluster. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243xii Table of Contents

PrefaceKubernetes: A DedicationKubernetes would like to thank every sysadmin who has woken up at 3 a.m. to restarta process. Every developer who pushed code to production only to find that it didn’trun like it did on their laptop. Every systems architect who mistakenly pointed a loadtest at the production service because of a leftover hostname that they hadn’t updated.It was the pain, the weird hours, and the weird errors that inspired the developmentof Kubernetes. In a single sentence: Kubernetes intends to radically simplify the taskof building, deploying, and maintaining distributed systems. It has been inspired bydecades of real-world experience building reliable systems and it has been designedfrom the ground up to make that experience if not euphoric, at least pleasant. Wehope you enjoy the book!Who Should Read This BookWhether you are new to distributed systems or have been deploying cloud-native sys‐tems for years, containers and Kubernetes can help you achieve new levels of velocity,agility, reliability, and efficiency. This book describes the Kubernetes cluster orches‐trator and how its tools and APIs can be used to improve the development, delivery,and maintenance of distributed applications. Though no previous experience withKubernetes is assumed, to make maximal use of the book you should be comfortablebuilding and deploying server-based applications. Familiarity with concepts like loadbalancers and network storage will be useful, though not required. Likewise, experi‐ence with Linux, Linux containers, and Docker, though not essential, will help youmake the most of this book.xiii

Why We Wrote This BookWe have been involved with Kubernetes since its very beginnings. It has been trulyremarkable to watch it transform from a curiosity largely used in experiments to acrucial production-grade infrastructure that powers large-scale production applica‐tions in varied fields, from machine learning to online services. As this transitionoccurred, it became increasingly clear that a book that captured both how to use thecore concepts in Kubernetes and the motivations behind the development of thoseconcepts would be an important contribution to the state of cloud-native applicationdevelopment. We hope that in reading this book, you not only learn how to build reli‐able, scalable applications on top of Kubernetes but also receive insight into the corechallenges of distributed systems that led to its development.Why We Updated This BookIn the few years that have passed since we wrote the first edition of this book, theKubernetes ecosystem has blossomed and evolved. Kubernetes itself has had manyreleases, and many more tools and patterns for using Kubernetes have become defacto standards. In updating the book we added material on HTTP load balancing,role-based access control (RBAC), extending the Kubernetes API, how to organizeyour application in source control, and more. We also updated all of the existingchapters to reflect the changes and evolution in Kubernetes since the first edition. Wefully expect to revise this book again in a few years (and look forward to doing so) asKubernetes continues to evolve.A Word on Cloud-Native Applications TodayFrom the first programming languages, to object-oriented programming, to thedevelopment of virtualization and cloud infrastructure, the history of computer sci‐ence is a history of the development of abstractions that hide complexity andempower you to build ever more sophisticated applications. Despite this, the develop‐ment of reliable, scalable applications is still dramatically more challenging than itought to be. In recent years, containers and container orchestration APIs like Kuber‐netes have proven to be an important abstraction that radically simplifies the devel‐opment of reliable, scalable distributed systems. Though containers and orchestratorsare still in the process of entering the mainstream, they are already enabling develop‐ers to build and deploy applications with a speed, agility, and reliability that wouldhave seemed like science fiction only a few years ago.xiv Preface

Navigating This BookThis book is organized as follows. Chapter 1 outlines the high-level benefits of Kuber‐netes without diving too deeply into the details. If you are new to Kubernetes, this is agreat place to start to understand why you should read the rest of the book.Chapter 2 provides a detailed introduction to containers and containerized applica‐tion development. If you’ve never really played around with Docker before, this chap‐ter will be a useful introduction. If you are already a Docker expert, it will likely bemostly review.Chapter 3 covers how to deploy Kubernetes. While most of this book focuses on howto use Kubernetes, you need to get a cluster up and running before you start using it.Although running a cluster for production is out of the scope of this book, this chap‐ter presents a couple of easy ways to create a cluster so that you can understand howto use Kubernetes. Chapter 4 covers a selection of common commands used to inter‐act with a Kubernetes cluster.Starting with Chapter 5, we dive into the details of deploying an application usingKubernetes. We cover Pods (Chapter 5), labels and annotations (Chapter 6), services(Chapter 7), Ingress (Chapter 8), and ReplicaSets (Chapter 9). These form the corebasics of what you need to deploy your service in Kubernetes. We then cover deploy‐ments (Chapter 10), which tie together the lifecycle of a complete application.After those chapters, we cover some more specialized objects in Kubernetes: Dae‐monSets (Chapter 11), Jobs (Chapter 12), and ConfigMaps and secrets (Chapter 13).While these chapters are essential for many production applications, if you are justlearning Kubernetes you can skip them and return to them later, after you gain moreexperience and expertise.Next we cover integrating storage into Kubernetes (Chapter 15). We discuss extend‐ing Kubernetes in Chapter 16. Finally, we conclude with some examples of how todevelop and deploy real-world applications in Kubernetes (Chapter 17) and a discus‐sion of how to organize your applications in source control (Chapter 18).Online ResourcesYou will want to install Docker. You likely will also want to familiarize yourself withthe Docker documentation if you have not already done so.Likewise, you will want to install the kubectl command-line tool. You may also wantto join the Kubernetes Slack channel, where you will find a large community of userswho are willing to talk and answer questions at nearly any hour of the day.Finally, as you grow more advanced, you may want to engage with the open sourceKubernetes repository on GitHub.Preface xv

Conventions Used in This BookThe following typographical conventions are used in this book:ItalicIndicates new terms, URLs, email addresses, filenames, and file extensions.Constant widthUsed for program listings, as well as within paragraphs to refer to program ele‐ments such as variable or function names, databases, data types, environmentvariables, statements, and keywords.Constant width boldShows commands or other text that should be typed literally by the user.Constant width italicShows text that should be replaced with user-supplied values or by values deter‐mined by context.This icon signifies a tip, suggestion, or general note.This icon indicates a warning or caution.Using Code ExamplesSupplemental material (code examples, exercises, etc.) is available for download mples.This book is here to help you get your job done. In general, if example code is offeredwith this book, you may use it in your programs and documentation. You do notneed to contact us for permission unless you’re reproducing a significant portion ofthe code. For example, writing a program that uses several chunks of code from thisbook does not require permission. Selling or distributing a CD-ROM of examplesfrom O’Reilly books does require permission. Answering a question by citing thisbook and quoting example code does not require permission. Incorporating a signifi‐cant amount of example code from this book into your product’s documentation doesrequire permission.xvi Preface

We appreciate, but do not require, attribution. An attribution usually includes thetitle, author, publisher, and ISBN. For example: “Kubernetes: Up and Running, 2ndedition, by Brendan Burns, Joe Beda, and Kelsey Hightower (O’Reilly). Copyright2019 Brendan Burns, Joe Beda, and Kelsey Hightower, 978-1-492-04653-0.”If you feel your use of code examples falls outside fair use or the permission givenabove, feel free to contact us at permissions@oreilly.com.O’Reilly Online LearningFor almost 40 years, O’Reilly Media has provided technologyand business training, knowledge, and insight to help compa‐nies succeed.Our unique network of experts and innovators share their knowledge and expertisethrough books, articles, conferences, and our online learning platform. O’Reilly’sonline learning platform gives you on-demand access to live training courses, indepth learning paths, interactive coding environments, and a vast collection of textand video from O’Reilly and 200 other publishers. For more information, pleasevisit http://oreilly.com.How to Contact UsPlease address comments and questions concerning this book to the publisher:O’Reilly Media, Inc.1005 Gravenstein Highway NorthSebastopol, CA 95472800-998-9938 (in the United States or Canada)707-829-0515 (international or local)707-829-0104 (fax)We have a web page for this book, where we list errata, examples, and any additionalinformation. You can access this page at http://bit.ly/kubernetesUR 2e.To comment or ask technical questions about this book, send email to bookques‐tions@oreilly.com.For more information about our books, courses, conferences, and news, see our web‐site at http://www.oreilly.com.Find us on Facebook: http://facebook.com/oreillyFollow us on Twitter: http://twitter.com/oreillymediaPreface xvii

Watch us on YouTube: We would like to acknowledge everyone who helped us develop this book. Thisincludes our editor Virginia Wilson and all of the great folks at O’Reilly, as well as thetechnical reviewers who provided tremendous feedback that significantly improvedthe book. Finally, we would like to thank all of our first edition readers who took thetime to report errata that were found and fixed in this second edition. Thank you all!We’re very grateful.xviii Preface

CHAPTER 1IntroductionKubernetes is an open source orchestrator for deploying containerized applications. Itwas originally developed by Google, inspired by a decade of experience deployingscalable, reliable systems in containers via application-oriented APIs.1Since its introduction in 2014, Kubernetes has grown to be one of the largest andmost popular open source projects in the world. It has become the standard API forbuilding cloud-native applications, present in nearly every public cloud. Kubernetesis a proven infrastructure for distributed systems that is suitable for cloud-nativedevelopers of all scales, from a cluster of Raspberry Pi computers to a warehouse fullof the latest machines. It provides the software necessary to successfully build anddeploy reliable, scalable distributed systems.You may be wondering what we mean when we say “reliable, scalable distributed sys‐tems.” More and more services are delivered over the network via APIs. These APIsare often delivered by a distributed system, the various pieces that implement the APIrunning on different machines, connected via the network and coordinating theiractions via network communication. Because we rely on these APIs increasingly forall aspects of our daily lives (e.g., finding directions to the nearest hospital), these sys‐tems must be highly reliable. They cannot fail, even if a part of the system crashes orotherwise stops working. Likewise, they must maintain availability even during soft‐ware rollouts or other maintenance events. Finally, because more and more of theworld is coming online and using such services, they must be highly scalable so thatthey can grow their capacity to keep up with ever-increasing usage without radicalredesign of the distributed system that implements the services.1 Brendan Burns et al., “Borg, Omega, and Kubernetes: Lessons Learned from Three Container-ManagementSystems over a Decade,” ACM Queue 14 (2016): 70–93, available at http://bit.ly/2vIrL4S.1

Depending on when and why you have come to hold this book in your hands, youmay have varying degrees of experience with containers, distributed systems, andKubernetes. You may be planning on building your application on top of public cloudinfrastructure, in private data centers, or in some hybrid environment. Regardless ofwhat your experience is, we believe this book will enable you to make the most ofyour use of Kubernetes.There are many reasons why people come to use containers and container APIs likeKubernetes, but we believe they can all be traced back to one of these benefits: Velocity Scaling (of both software and teams) Abstracting your infrastructure EfficiencyIn the following sections, we describe how Kubernetes can help provide each of thesefeatures.VelocityVelocity is the key component in nearly all software development today. The softwareindustry has evolved from shipping products as boxed CDs or DVDs to software thatis delivered over the network via web-based services that are updated hourly. Thischanging landscape means that the difference between you and your competitors isoften the speed with which you can develop and deploy new components and fea‐tures, or the speed with which you can respond to innovations developed by others.It is important to note, however, that velocity is not defined in terms of simply rawspeed. While your users are always looking for iterative improvement, they are moreinterested in a highly reliable service. Once upon a time, it was OK for a service to bedown for maintenance at midnight every night. But today, all users expect constantuptime, even if the software they are running is changing constantly.Consequently, velocity is measured not in terms of the raw number of features youcan ship per hour or day, but rather in terms of the number of things you can shipwhile maintaining a highly available service.In this way, containers and Kubernetes can provide the tools that you need to movequickly, while staying available. The core concepts that enable this are: Immutability Declarative configuration Online self-healing systems2 Chapter 1: Introduction

These ideas all interrelate to radically improve the speed with which you can reliablydeploy software.The Value of ImmutabilityContainers and Kubernetes encourage developers to build distributed systems thatadhere to the principles of immutable infrastructure. With immutable infrastructure,once an artifact is created in the system it does not change via user modifications.Traditionally, computers and software systems have been treated as mutable infra‐structure. With mutable infrastructure, changes are applied as incremental updates toan existing system. These updates can occur all at once, or spread out across a longperiod of time. A system upgrade via the apt-get update tool is a good example ofan update to a mutable system. Running apt sequentially downloads any updatedbinaries, copies them on top of older binaries, and makes incremental updates toconfiguration files. With a mutable system, the current state of the infrastructure isnot represented as a single artifact, but rather an accumulation of incrementalupdates and changes over time. On many systems these incremental updates comefrom not just system upgrades, but operator modifications as well. Furthermore, inany system run by a large team, it is highly likely that these changes will have beenperformed by many different people, and in many cases will not have been recordedanywhere.In contrast, in an immutable system, rather than a series of incremental updates andchanges, an entirely new, complete image is built, where the update simply replacesthe entire image with the newer image in a single operation. There are no incrementalchanges. As you can imagine, this is a significant shift from the more traditionalworld of configuration management.To make this more concrete in the world of containers, consider two different ways toupgrade your software:1. You can log in to a container, run a command to download your new software,kill the old server, and start the new one.2. You can build a new container image, push it to a container registry, kill the exist‐ing container, and start a new one.At first blush, these two approaches might seem largely indistinguishable. So what isit about the act of building a new container that improves reliability?The key differentiation is the artifact that you create, and the record of how you cre‐ated it. These records make it easy to understand exactly the differences in some newversion and, if something goes wrong, to determine what has changed and how to fixit.Velocity 3

Additionally, building a new image rather than modifying an existing one means theold image is still around, and can quickly be used for a rollback if an error occurs. Incontrast, once you copy your new binary over an existing binary, such a rollback isnearly impossible.Immutable container images are at the core of everything that

Kubernetes is assumed, to make maximal use of the book you should be comfortable building and deploying server-based applications. Familiarity with concepts like load balancers and network stora

Related Documents:

The top Kubernetes environments are Minikube (37%), on-prem Kubernetes installations (31%), and Docker Kubernetes (29%). On-prem Kubernetes installation increased to 31% from 23% last year. Packaging Applications What is your preferred method for packaging Kubernetes applications? Helm is still the most popular tool for packaging Kubernetes

Kubernetes support in Docker for Desktop 190 Pods 196 Comparing Docker Container and Kubernetes pod networking 197 Sharing the network namespace 198 Pod life cycle 201 Pod specification 202 Pods and volumes 204 Kubernetes ReplicaSet 206 ReplicaSet specification 207 Self-healing208 Kubernetes deployment 209 Kubernetes service 210

Configuring Kubernetes to run Oracle Programs on Certain Kubernetes Nodes Using Generic Kubernetes Features To leverage these Kubernetes features to limit Oracle licensing requirements for Oracle Programs to certain Kubernetes nodes within a Kubernetes clusters, you should perform the following steps using kubectl and YAML editing tools: 1.

Kubernetes and Canonical This reference architecture based on Canonical's Charmed Kubernetes. Canonical commercially distributes and supports the pure upstream version of Kubernetes. Ubuntu is the reference operating system for Kubernetes deployments, making it an easy way to build Kubernetes clusters.

Kubernetes integration in Docker EE What the community and our customers asked for: Provide choice of orchestrators Make Kubernetes easier to manage Docker Dev to Ops user experience with Kubernetes Docker EE advanced capabilities on Kubernetes Kubernetes management on multiple Linux distributions, multiple clouds and Windows

Kubernetes Engine (GKE), Amazon Elastic Container Service for Kubernetes (EKS) or Azure Kubernetes Service (AKS). B. Install, run, and manage Kubernetes on an IaaS platform such as Amazon EC2, Azure, Google Cloud or DigitalOcean. C. Install, run, and manage Kubernetes on infrastructure you own, either on bare metal or on a private cloud .

polyatomic ions: a. amm onium ion b. sulfate ion c. sulfite ion d. carbonate ion e. nitrate ion f. permanganate ion g. hypochlorite ion h. phosphate ion i. cyanide ion j. hydroxide ion 9.2 Naming and Writing Formulas for Ionic Compounds A. _ Ionic Compounds 1. What are Binary Ionic Compounds? 2.

ION 7550 / ION 7650 User Guide The ION meter in an Enterprise Energy Management System Chapter 1 - Introduction Page 11 The ION meter in an Enterprise Energy Management System You can use ION 7550 and ION 7650 meters as standalone devices, but their extensive capabilities are full y realized when used with ION software as part of an