Author:Kevin Welter
No description
Tags
Support Statistics
¥.00 ·
0times
Text Preview (First 20 pages)
Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Page
1
(This page has no text content)
Page
2
Rheinwerk Computing The Rheinwerk Computing series offers new and established professionals comprehen- sive guidance to enrich their skillsets and enhance their career prospects. Our publica- tions are written by the leading experts in their fields. Each book is detailed and hands-on to help readers develop essential, practical skills that they can apply to their daily work. Explore more of the Rheinwerk Computing library! Bernd Öggl, Michael Kofler Docker: Practical Guide for Developers and DevOps Teams 2023, 491 pages, paperback and e-book www.rheinwerk-computing.com/5650 Bernd Öggl, Michael Kofler Git: Project Management for Developers and DevOps Teams 2023, 407 pages, paperback and e-book www.rheinwerk-computing.com/5555 Michael Kofler Linux: The Comprehensive Guide 2024, 1178 pages, paperback and e-book www.rheinwerk-computing.com/5779 Michael Kofler Scripting: Automation with Bash, PowerShell, and Python 2024, 470 pages, paperback and e-book www.rheinwerk-computing.com/5851 Johannes Ernesti, Peter Kaiser Python 3: The Comprehensive Guide 2022, 1036 pages, paperback and e-book www.rheinwerk-computing.com/5566 www.rheinwerk-computing.com
Page
3
Kevin Welter Kubernetes Practical Guide for Developers and DevOps Teams
Page
4
Imprint This e-book is a publication many contributed to, specifically: Editor Rachel Gibson Acquisitions Editor Hareem Shafi German Edition Editor Dr. Christoph Meister Translation Winema Language Services, Inc. Copyeditor Melinda Rankin Cover Design Graham Geary Photo Credit Shutterstock: 1716623578/© hxdbzxy Layout Design Vera Brauner Production E-Book Kelly O’Callaghan Typesetting E-Book SatzPro, Germany We hope that you liked this e-book. Please share your feedback with us and read the Service Pages to find out how to contact us. The Library of Congress has cataloged the printed edition as follows: Names: Welter, Kevin, author. Title: Kubernetes : practical guide for developers and DevOps teams / Kevin Welter. Description: 1st edition. | Bonn ; Boston : Rheinwerk Publishing, 2024. | Includes index. Identifiers: LCCN 2024034038 | ISBN 9781493226467 (hardcover) | ISBN 9781493226474 (ebook) Subjects: LCSH: Virtual computer systems. | Cloud computing. | Application software--Development--Computer programs. | Kubernetes. Classification: LCC QA76.9.V5 W45 2024 | DDC 005.4/3--dc23/eng/20240802 LC record available at https://lccn.loc.gov/2024034038 ISBN 978-1-4932-2646-7 (print) ISBN 978-1-4932-2647-4 (e-book) ISBN 978-1-4932-2648-1 (print and e-book) © 2025 by Rheinwerk Publishing, Inc., Boston (MA) 1st edition 2025 1st German edition published 2024 by Rheinwerk Verlag, Bonn, Germany
Page
5
(This page has no text content)
Page
6
Contents Preface ....................................................................................................................................................... 13 1 Introduction to Kubernetes 21 1.1 Basic Principles and Concepts: Why Use Container Clusters at All? ............... 21 1.1.1 Why Use Containers at All? ................................................................................. 23 1.1.2 Why You Need a Container Management Tool ........................................... 27 1.1.3 Of Pets and Cattle .................................................................................................. 28 1.1.4 Stateless and Stateful Applications ................................................................. 29 1.1.5 Separation of Concerns ........................................................................................ 31 1.2 Kubernetes, the Tool of Choice ....................................................................................... 34 1.2.1 Why Do Companies Want to Use Kubernetes? ............................................ 34 1.2.2 The Promise of Kubernetes ................................................................................. 37 1.2.3 Major Features ........................................................................................................ 41 1.2.4 For Which Companies Is Kubernetes Useful? ............................................... 42 1.2.5 Which Companies Should Not Use Kubernetes? ......................................... 44 1.3 Architecture and Components ........................................................................................ 45 1.3.1 Master Nodes ........................................................................................................... 46 1.3.2 Worker Nodes .......................................................................................................... 49 1.3.3 API Call Flow ............................................................................................................. 51 1.4 A Kubernetes Cluster on Your Computer .................................................................... 53 1.4.1 Minikube on macOS .............................................................................................. 54 1.4.2 Minikube on Linux ................................................................................................. 55 1.4.3 Minikube on Windows ......................................................................................... 57 1.4.4 Launching Minikube .............................................................................................. 58 1.4.5 Controlling Minikube ............................................................................................ 58 1.4.6 Possible Errors when Starting Minikube ........................................................ 59 1.4.7 Container Registry of Minikube ......................................................................... 59 1.5 Interaction with Kubernetes via the Command Line and Dashboard ........... 61 1.5.1 Minikube Comes With kubectl .......................................................................... 61 1.5.2 Installing kubectl .................................................................................................... 61 1.5.3 Accessing the Cluster Using Kubeconfig ........................................................ 65 1.5.4 Namespaces ............................................................................................................. 67 1.5.5 kubectl Commands ................................................................................................ 68 1.5.6 Switching Clusters and Namespaces Easily .................................................. 77 1.5.7 The Kubernetes Dashboard ................................................................................ 787
Page
7
Contents1.6 Lens: The IDE for Kubernetes ............................................................................................ 81 1.6.1 Overview of Lens ..................................................................................................... 82 1.6.2 Advantages over the Kubernetes Dashboard ............................................... 83 1.6.3 The Lens Reference ................................................................................................ 86 1.7 The Kubernetes Cluster from Raspberry Pis .............................................................. 89 1.7.1 Choosing the Right Raspberry Pis ..................................................................... 90 1.7.2 Installation of Kubernetes ................................................................................... 92 1.7.3 Using the Kubeconfig File of the Pi Cluster ................................................... 93 2 Basic Objects and Concepts in Kubernetes 95 2.1 Pod and Container Management ................................................................................... 98 2.1.1 Container Engines .................................................................................................. 101 2.1.2 Your First Own Pod ................................................................................................ 104 2.1.3 Multiple Containers within a Pod ..................................................................... 106 2.1.4 Communication between Containers ............................................................. 109 2.1.5 Init Container ........................................................................................................... 110 2.1.6 Pod Phases and Container Statuses ................................................................. 113 2.1.7 The Restart Policy of Pods .................................................................................... 114 2.1.8 When the Pod Comes to an End ........................................................................ 115 2.2 Annotations and Labels ...................................................................................................... 118 2.2.1 Using Labels and Selectors .................................................................................. 119 2.2.2 Field Selectors .......................................................................................................... 121 2.2.3 NodeSelector ............................................................................................................ 122 2.2.4 Node Affinity and Antiaffinity ........................................................................... 124 2.2.5 Pod Affinity and Antiaffinity ............................................................................... 128 2.2.6 Taints and Tolerations .......................................................................................... 133 2.2.7 Annotations .............................................................................................................. 136 2.3 Deployments and ReplicaSets ......................................................................................... 138 2.3.1 The Role of ReplicaSets ......................................................................................... 139 2.3.2 Creating Deployments .......................................................................................... 142 2.3.3 Rolling Updates via the Deployment Object ................................................. 144 2.3.4 Rollback via Deployment ..................................................................................... 150 2.4 ConfigMaps and Secrets ..................................................................................................... 152 2.4.1 What Are ConfigMaps? ........................................................................................ 154 2.4.2 What Are Secrets? .................................................................................................. 162 2.5 Establishing a Communication with Services and an Ingress ........................... 171 2.5.1 Communication between Pods ......................................................................... 1738
Page
8
Contents2.5.2 Communication via a Service ............................................................................. 174 2.5.3 Communication via Ingress ................................................................................ 180 3 Everything as Code: Tools and Principles for Kubernetes Operations 187 3.1 Declarative Configurations ............................................................................................... 188 3.2 YAML: The Language for Kubernetes ........................................................................... 192 3.2.1 Basics of YAML Syntax .......................................................................................... 192 3.2.2 Data Types in YAML ............................................................................................... 194 3.2.3 Anchors and Aliases ............................................................................................... 196 3.2.4 Single-Line YAML Notation in Documentation ............................................ 197 3.2.5 Weaknesses of YAML ............................................................................................ 197 3.2.6 Tips for Practical Use ............................................................................................. 199 3.3 Version Management of Kubernetes Manifests ..................................................... 200 3.3.1 Using Git .................................................................................................................... 201 3.3.2 Managing Numerous Kubernetes Manifests ............................................... 203 3.3.3 Branching Strategies ............................................................................................. 207 3.3.4 Division of the Repositories ................................................................................ 211 3.4 Continuous Integration and Continuous Delivery ................................................. 213 3.4.1 Pipeline Steps for Kubernetes ............................................................................ 213 3.4.2 Pipeline Architectures ........................................................................................... 218 3.4.3 GitOps ........................................................................................................................ 223 3.5 Templating Using Kustomize ........................................................................................... 225 3.5.1 Basic Principles of Kustomize ............................................................................. 226 3.5.2 Resource Generator ............................................................................................... 231 3.5.3 More Kustomize Built-Ins .................................................................................... 233 3.5.4 Conclusion on Kustomize .................................................................................... 234 4 Advanced Objects and Concepts in Kubernetes 235 4.1 DaemonSets ............................................................................................................................. 236 4.2 Jobs in Kubernetes ................................................................................................................ 239 4.2.1 Real-Life Kubernetes Jobs .................................................................................... 240 4.2.2 Queue Worker with RabbitMQ .......................................................................... 242 4.2.3 Kubernetes CronJobs ............................................................................................. 2469
Page
9
Contents4.3 Custom Resources and Custom Resource Definitions .......................................... 248 4.3.1 Example: A Monitoring CR .................................................................................. 249 4.3.2 Validation in CRD .................................................................................................... 252 4.3.3 Operators .................................................................................................................. 255 4.4 Downward API ........................................................................................................................ 258 4.5 Pod Priority and Preemption ............................................................................................ 261 4.6 Versioning Objects in Kubernetes .................................................................................. 263 5 Stateful Applications and Storage 265 5.1 Stateful Applications in Kubernetes through StatefulSets ................................ 266 5.1.1 Pod Management Policy ...................................................................................... 269 5.1.2 Strategies for Updates .......................................................................................... 270 5.1.3 Retention Policy for Persistent Volume Claims ............................................ 272 5.2 Persistent Volumes and Persistent Volume Claims ............................................... 273 5.2.1 Storage Types for PVs ............................................................................................ 278 5.2.2 CSI Drivers for External Storage Media ........................................................... 281 5.2.3 Storage Classes and Dynamic PVs .................................................................... 283 5.2.4 PostgreSQL as StatefulSet with Persistent Volume .................................... 286 5.3 Ephemeral Volumes ............................................................................................................. 289 5.4 Other Features of Volumes ............................................................................................... 291 5.4.1 Volume Snapshots ................................................................................................. 292 5.4.2 Projected Volumes ................................................................................................. 295 6 Kubernetes Governance and Security: Prepare for Production 299 6.1 Pod Security ............................................................................................................................. 301 6.2 Pod Security Admission ...................................................................................................... 304 6.3 Admission Controller ........................................................................................................... 306 6.4 Kubernetes Policies ............................................................................................................... 308 6.5 Policy Objects .......................................................................................................................... 31110
Page
10
Contents6.6 Role-Based Access Control in Kubernetes .................................................................. 313 6.6.1 Subjects: Users, Groups, and Service Accounts ............................................ 315 6.6.2 Roles and Role Bindings ....................................................................................... 317 6.6.3 Conclusion ................................................................................................................ 319 7 Developing Applications for Kubernetes: Ready for Production 321 7.1 Managing Pod Resources ................................................................................................... 322 7.2 Readiness, Liveness, and Startup Probes .................................................................... 325 7.2.1 How to Define Probes ........................................................................................... 328 7.2.2 Testing Probes Using an Example ..................................................................... 330 7.3 Scaling and Load Balancing ............................................................................................... 335 7.3.1 Horizontal Pod Autoscaling ................................................................................ 335 7.3.2 Vertical Pod Autoscaling ...................................................................................... 339 7.3.3 Cluster Autoscaler .................................................................................................. 341 7.4 Monitoring ................................................................................................................................ 342 7.4.1 Introduction: Prometheus, Grafana, and Alertmanager ........................... 343 7.4.2 Monitoring on the Pi Cluster .............................................................................. 345 8 Orchestrating Kubernetes Using Helm 357 8.1 Helm: The Kubernetes Package Manager .................................................................. 358 8.1.1 Creating a First Helm Chart ................................................................................ 361 8.1.2 Deploying a Helm Chart via the Command Line Interface ....................... 361 8.1.3 Setting Up and Managing a Helm Repository .............................................. 363 8.1.4 Deploying a Helm Chart via Lens ...................................................................... 365 8.1.5 Updating and Deleting Helm Releases ........................................................... 366 8.1.6 Downloading Helm Charts from a Repository .............................................. 368 8.2 Reading and Developing Helm Charts ......................................................................... 368 8.2.1 The Templating Engine and the Language of the Charts ......................... 369 8.2.2 Configuring Charts with Values ........................................................................ 374 8.2.3 Conditions in Helm Templates .......................................................................... 378 8.2.4 Other Operations and Control Structures ...................................................... 380 8.2.5 Helm Diff for Checking Changes ....................................................................... 38311
Page
11
Contents8.3 Developing Custom Charts ................................................................................................ 385 8.3.1 The Framework of Your Helm Chart ................................................................ 386 8.3.2 Packaging Charts and Storing Them in the Repository ............................. 387 8.3.3 Managing Dependencies in Helm Charts ...................................................... 390 8.4 Conclusion ................................................................................................................................ 394 The Author ............................................................................................................................................... 395 Index .......................................................................................................................................................... 397 Service Pages ............................................................................................................................................... Legal Notes ................................................................................................................................................... I II 12
Page
12
Preface Be water, my friend. —Bruce Lee Perhaps you know the interview with Bruce Lee from which this quote comes. The idea at the heart of his statement is the adaptability of water. What Bruce Lee meant was that you must adapt to your opponent in a fight. Adapt when necessary. Be open in order to be able to react appropriately to the environment and changing circum- stances. This sentence has been with me for quite a while—not only because I do mar- tial arts, but above all because this metaphor is also very appropriate in IT. When I started my training as an IT specialist in system integration in 2011, I had no idea what kind of world would open up to me. I learned the IT craft from scratch. I can still remember my first projects very well: We installed a network for a law firm. I drilled the holes myself, pulled the cables, and crimped the network connectors. I also configured and installed a new server for a medium-sized company, fixed the cables, and set it up in a server room on site. If you need a server today, you simply need to click Launch in your cloud provider’s frontend. A virtual machine (VM) is then activated for you by magic in some high- security data center. The world is constantly changing, and so is technology. Abstrac- tion makes it increasingly easier to use, but this does not bring only advantages. I first came into contact with the cloud, DevOps, Docker, and Kubernetes after graduat- ing in 2017, and the topic has stayed with me ever since. I still remember the days during my studies when I asked myself: “How does my software actually get to the cus- tomer?” I learned programming during my apprenticeship and studies. First it was Java, then C, then C++. I also learned what software engineering is, how to create unified modeling language (UML) diagrams, and how to develop in a machine-oriented way in assembler. But there was one thing I always missed: How does the software ultimately reach the customer? The operation itself had never really been part of my training. Thus, I am concerned with questions such as the following: How is the software built and packaged? How is the software delivered? What happens if the software doesn't work?13Personal Copy for Jaleel Hussain, alex76alex43@gmail.com
Page
13
PrefaceMost of the time, I ran my own development on my computer or in the integrated development environment (IDE). For a long time, no one was able to give me a satisfac- tory answer to my questions about the last piece of the puzzle. I entered a dual-study program, and during the practical phases, I worked in depart- ments that created software concepts. The work of my colleagues was to think about what the business requirements were and how they could be translated into software, and we wrote hundreds of pages of specifications and drew UML diagrams. The soft- ware was then developed both onshore and offshore by partner companies, which usually worked less than optimally. They were classic waterfall projects. Again, I never understood the software development process from start to finish. I always thought: “There is something missing. Somehow it doesn't fit yet.” And sometimes, I thought: “Maybe I'm just too stupid for that.” Today, I know that I'm not too stupid and that I was just missing the last little piece of the jigsaw. After my studies, I came into contact with modern agile software develop- ment for the first time. One team designs, develops, and delivers the software, while another team takes care of operations. That was also the first time I came across terms such as cloud, Docker, and Kubernetes. I had already learned about agile software devel- opment during my studies, but all the tools used for it were new to me. My world was completely turned upside down. I was familiar with virtual machines from my training, and I also knew that a cloud ser- vice is more than just a storage service like Dropbox or OneDrive. Today, among other things, I hold the AWS Certified Solutions Architect—Professional certification, and as I write about my past, I start smiling. The world of IT is so much bigger than I could have ever imagined, and I have really discovered my passion. Since I've been using the cloud, Docker, and Kubernetes, it's felt really smooth for me. I now understand how modern software operation works and what is needed for it. For this reason, I want to share my findings with you in this book. In 2017, I published an online course on the Udemy platform about getting started with Docker. My aim was to make getting started easier so that the participants get a feel for Docker by getting involved themselves. That's what I've been missing in my dual stud- ies so far. I am a hands-on person and learn best when I do something with my own hands. This book is also written in such a way that you get a quick introduction to the topic of Kubernetes. You will set up a cluster yourself and deploy your first services. I will take you on a journey and introduce you to the topic in a structured way because I love to keep things simple. It will get complicated all by itself, and pretty soon, so you will learn everything step by step that is important to make your software fit Kubernetes.14 © 2025 by Rheinwerk Publishing Inc., Boston (MA)
Page
14
StructureAcknowledgments To my son, Levi Ace: You show me every day what is truly important in life. To my wife, Nicole: Thank you for always having my back, even when I'm writing until late at night. To my best friend and business partner, Fabian: Thank you for our journey together over a decade. Structure Let me briefly explain what you can expect on the following pages. You are already in the middle of the Preface. I want to pick up where you are right now and introduce what awaits you. Chapter 1 and Chapter 2 have been designed as a tutorial. Each section builds on the preceding one. You will get to know the basic principles and concepts and then get down to work very quickly. After these chapters, you will be prepared for Kubernetes and can then delve deeper into individual topics. From Chapter 3 onward, we will take a closer look at individual aspects. You can read those chapters in the order in which you need them. Note Some sections in Chapter 1 and Chapter 2 are very well suited as reference sections. If you have the feeling in a particular section that this is not the right time for it, then you can just skim through it. This will feed your subconscious and you can come back to it when you need to read it in more detail. In Chapter 3, I will take you on a tour of infrastructure as code (IaC). You will learn about YAML and the difference between declarative and imperative work. Note As you will already be working with YAML and IaC in Chapter 2, you are welcome to skip to Chapter 3 for a small digression before continuing with Chapter 2. In Chapter 4, we will delve into more advanced concepts and objects. Chapter 5 is dedicated to the topic of storage and stateful applications. What do you do with applications that have a state, much like databases have? What types of storage are available in Kubernetes, and how can you best manage your data?15Personal Copy for Jaleel Hussain, alex76alex43@gmail.com
Page
15
PrefaceSecurity and governance is a major topic in IT. In Chapter 6, I will introduce you to top- ics such as user and rights management, pod security, and Kubernetes policies. You will get to know the basic principles to prepare your application for production. In Chapter 7, you will learn everything you need to know to make your application “ready for production,” such as resource management, health checks, and scaling for your applications. Finally, in Chapter 8, you will get to know Helm, the Kubernetes package manager. Note that you will have already used Helm in earlier chapters to deploy finished applications in examples. Helm will make your life as a developer very easy and help you to make your application fit for multiple environments. What You Should Already Know Now Kubernetes is software that builds on knowledge of other topics, such as the topic of containers, which themselves can fill entire books. For this reason, there are some pre- requisites that you’re expected to meet in this book so that you can be introduced to the topic of Kubernetes quickly without us getting bogged down in the details. The Kubernetes tool is a container management system, which is why some basic knowledge of containers is required. You should be able to answer questions like the following: What is a container? How is a container structured? How can I build container images and bring my software into a container? How can I start and stop containers? How does the container tool work on my computer? I use Docker Desktop as a basis, build containers using Dockerfiles, and will set up a test cluster using Minikube as a container with you in Chapter 1, Section 1.4. Depending on your operating system, you can of course also use other tools, such as Podman. You are not dependent on Minikube either and can use other test clusters if you are familiar with them. Note If you use a company computer, you may need a license for Docker Desktop. If you are unsure, it is best to ask or to use your private computer. The containers used in this book are all based on Linux images. It is therefore an advan- tage if you are familiar with the basics of Linux. You should also be able to use the com- mand line through tools such as Bash or another shell. If you've ever written Bash scripts before, then what we use in this book will be a breeze for you. If you run the16 © 2025 by Rheinwerk Publishing Inc., Boston (MA)
Page
16
Structureexamples on a Windows operating system, you should be able to use PowerShell. How- ever, I will also provide you with the most important commands in that respect. We will use command line interface (CLI) tools such as kubectl and Minikube. These are programs that are executed on the command line to operate Kubernetes, for example. Here I will guide you step by step, but you will find your way around more quickly if you have already used CLI tools previously. In general, however, this book is suitable for beginners. You will get to know Kuber- netes from the ground up, and I will try to pick you up as best I can from where you are right now. This means that even if you have little experience with the tools mentioned so far, you will be able to work through this book. In some places, it may be advanta- geous for you to put the book away and grab additional learning content on Docker and the like. What You Will Learn As mentioned earlier, this book is aimed at developers and DevOps engineers who want to get to grips with Kubernetes—whether you've only recently heard of Kuber- netes or have been using it for some time. After reading this book, you will have the tools you need to develop and run your applications for Kubernetes. You will be able to build resilient, scalable, and reliable infrastructures. Your applications will be ready for production environments thanks to self-healing and load balancing. You will not or will only marginally learn how to install or administrate a Kubernetes cluster in this book. However, what you will learn is how to run applications in a cluster and what you need to bear in mind as a developer. In addition, you will learn how to operate and control a Kubernetes cluster. For this purpose, you will install a test cluster on your computer based on Minikube. This will help you to try everything out in a test environment. Important to Know In the advanced chapters, you will delve deeper into the peculiarities of Kubernetes. I use simple applications as an example. If you try to run through the examples directly with your own applications, the learning effect is significantly higher, and you can then implement what you have learned much better in your daily work. Perhaps you know this too: Imagine you want to go on a vacation to Italy and use a lan- guage app at home to learn the most important terms such as hello, goodbye, and apple. Even short phrases like “A coffee, please” and “I'd like to pay.” Then the time has come. You have arrived at your vacation destination and enter the first café. The waiter asks you what you would like to have and suddenly everything you have learned is gone. Not a word escapes your lips.17Personal Copy for Jaleel Hussain, alex76alex43@gmail.com
Page
17
PrefaceHere’s what memory research has found out: The recall of a new skill is most successful when the circumstances are as similar as possible to those under which the neuronal connections took place. So when we study at home at our desks using an app, we find it easiest to retrieve the information by using that very same app. In a new situation, such as an Italian café, the circumstances are different, and we can no longer recall the infor- mation. For this reason, it is important that you try out each chapter’s content either directly or additionally with your own projects. This will make everything more interconnected and you will be able to apply the content much better. Have confidence in the process of this book. In the end, everything will fall into place and you will be able to use Kuber- netes successfully in your environment. We still have a few steps to go before then, but I will accompany you. I also want to introduce you to a model developed by the Canadian psychologist Albert Bandura (see Figure 1). Figure 1 Four Stages of Learning According to Albert Bandura ← Forgetting ← D e co d in g th e M o d e lin g ← R e p re ss in g Conscious Incompetence Conscious Competence Unconscious Incompetence Unconscious Competence Internalization Habitualization Familiarization Automation Unconscious "Copying from Others" LEARNING THE MODEL Learning by Listening, Watching, Practicing, and Repeating Uncovering "Blind Spots" Feedback CRITICISM18 © 2025 by Rheinwerk Publishing Inc., Boston (MA)
Page
18
Book ResourcesYou may even already know it, because it is a well-known model of how learning works for us humans. Bandura divides human learning into four stages: 1. Unconscious incompetence 2. Conscious incompetence 3. Conscious competence 4. Unconscious competence Think about your driver's license. Can you remember what it was like for you when you first got behind the steering wheel? Or stalled the car at traffic lights for the first time? You suddenly realize that you are missing a skill. You want to drive but you also realize that it won't be an easy path because the only way from conscious incompetence to conscious competence is hard work. You learn and practice over and over again. After a while you will be able to drive. But there's always that little voice in your head saying: “Shift gears now” or “Look over your shoulder and signal.” You must drive with full awareness and cognitive effort. Only after many hours of driving does the activity gradually become easier and you develop automatism. Today I can drive the car while listening to children's music for my son's sake and singing along loudly. Driving itself has become unconscious and easy. By purchasing this book, you have already left the first phase behind you. You are aware that you have to learn. The transition from phase 2 to phase 3 is the hardest and is often associated with a lot of frustration. The book will make the transition as easy as possible so that you can enjoy implementing it and become a Kubernetes expert with ease. I wish you lots of success and fun reading, learning, and playing. Book Resources Sample listings are available for you to download from the website for this book. Go to www.rheinwerk-computing.com/5964. Scroll down to the Product Supplements box. You will see the downloadable files along with a brief description of the file content. Click the Download button to start the download. Depending on the size of the file (and the speed of your internet connection), it may take some time for the download to complete.19Personal Copy for Jaleel Hussain, alex76alex43@gmail.com
Page
19
© 2025 by Rheinwerk Publishing Inc., Boston (MA)
Page
20
Chapter 1 Introduction to Kubernetes Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications. —kubernetes.io Developing containers and running them on your laptop computer is easily doable with a little know-how. However, operating hundreds of containers across multiple host systems, scaling them as required, and not risking any downtime is a lot more complicated. Kubernetes (K8s) was developed to address and solve these types of issues. The name has its origins in Greek and means helmsman. This is also where the Kubernetes logo comes from. Developed by Google and continued as an open-source project, it is now an integral part of many companies. Before I guide you through installing your first Kubernetes cluster on your computer, let's dive into the basics of Kubernetes. Good to Know The abbreviation K8s comes from replacing the eight letters of ubernete with the num- ber 8. Note The book is based on Kubernetes version v1.27. If your company uses clusters of an older version, then some features are probably not available. For new features, I will point this out separately in the corresponding chapter. If you are unsure whether a feature can be used in your company, you can check the Kubernetes documentation at https://kubernetes.io/ or ask your administrator. 1.1 Basic Principles and Concepts: Why Use Container Clusters at All? To better understand Kubernetes, I want to take you back to the past and the system’s origins. Kubernetes saw the light of day on June 7, 2014, at least in the public world, as21Personal Copy for Jaleel Hussain, alex76alex43@gmail.com
Comments 0
Loading comments...
Reply to Comment
Edit Comment