Managing Kubernetes Resources Using Helm: Simplifying how to build, package, and distribute applications for Kubernetes, 2nd Edition
- Length: 310 pages
- Edition: 2
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-09-30
- ISBN-10: 1803242892
- ISBN-13: 9781803242897
- Sales Rank: #126274 (See Top 100 Books)
Reduce the complexity of managing applications on Kubernetes and develop an enterprise pattern for application delivery
Key Features
- Learn best practices from the core maintainer of Helm for application delivery and life cycle management
- Manage applications deployed in Kubernetes effectively using Helm
- Go beyond the basics when using Helm with key security considerations and management options
Book Description
Containerization is one of the best ways to implement DevOps, and learning how to execute it effectively is an essential part of a developer’s skillset. Kubernetes is the current industry standard for container orchestration. This book will help you discover the efficiency of managing applications running on Kubernetes with Helm.
Starting with a brief introduction to Helm and its impact on users working with containers and Kubernetes, you’ll delve into the primitives of Helm charts and their architecture and use cases. From there, you’ll understand how to write Helm charts in order to automate application deployment on Kubernetes and work your way toward more advanced strategies. These enterprise-ready patterns are focused on concepts beyond the basics so that you can use Helm optimally, looking at topics related to automation, application development, delivery, lifecycle management, and security.
By the end of this book, you’ll have learned how to leverage Helm to build, deploy, and manage applications on Kubernetes.
What you will learn
- Understand how to deploy applications on Kubernetes with ease
- Package dynamic applications for deployment on Kubernetes
- Integrate Helm into an existing software release process
- Develop an enterprise automation strategy on Kubernetes using Helm
- Use Helm within a Helm Kubernetes operator
- Leverage Helm in a secure and stable manner that fits the enterprise
- Discover the ins and outs of automation with Helm
Who this book is for
This book is for Kubernetes developers or administrators who are interested in learning Helm to provide automation for app development on Kubernetes. Although no prior knowledge of Helm is required, basic knowledge of Kubernetes application development will be useful.
Managing Kubernetes Resources Using Helm Second Edition Foreword Contributors About the authors About the reviewers Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share Your Thoughts Part 1: Introduction and Setup Chapter 1: Understanding Kubernetes and Helm From monoliths to modern microservices What is Kubernetes? Container orchestration HA Scalability Active community Deploying a Kubernetes application Approaches to resource management Imperative and declarative configurations Resource configuration challenges The many types of Kubernetes resources Keeping live and local states in sync Application life cycles are hard to manage Resource files are static Helm to the rescue! Understanding package managers The Kubernetes package manager The benefits of Helm Summary Further reading Questions Chapter 2: Preparing a Kubernetes and Helm Environment Technical requirements Preparing a local Kubernetes environment with minikube Installing minikube Installing VirtualBox Configuring VirtualBox as the default driver Configuring minikube resource allocation Exploring the basic usage of minikube Setting up kubectl Installing kubectl Setting up Helm Installing Helm Configuring Helm Adding upstream repositories Adding plugins Environment variables Tab completion Authentication Authorization/RBAC Summary Further reading Questions Chapter 3: Installing Your First App with Helm Technical requirements Understanding the WordPress application Finding a WordPress chart Searching for WordPress charts from the command line Viewing the WordPress chart in a browser Bitnami repository chart retention policy Adding the full Bitnami repository Showing the WordPress chart information from the command line Creating a Kubernetes environment Installing a WordPress chart Creating a values file for configuration Running the installation Inspecting your release Choosing between --set and --values Accessing the WordPress application Upgrading the WordPress release Modifying the Helm values Running the upgrade Reusing and resetting values during an upgrade Rolling back the WordPress release Inspecting the WordPress history Running the rollback Uninstalling the WordPress release Shutting down your environment Summary Further reading Questions Part 2: Helm Chart Development Chapter 4: Scaffolding a New Helm Chart Technical requirements Understanding the Guestbook application Understanding the YAML format Defining key-value pairs Value types The JSON format Scaffolding the Guestbook Helm chart Deploying the scaffolded Guestbook chart Understanding the Chart.yaml file Updating the Guestbook Chart.yaml file Summary Further reading Questions Chapter 5: Helm Dependency Management Technical requirements Declaring chart dependencies The dependencies map Downloading chart dependencies Creating conditionals Altering dependency names and values Updating the guestbook Helm chart Cleaning up Summary Further reading Questions Chapter 6: Understanding Helm Templates Technical requirements Helm template basics Template values Built-in objects The .Release object The .Chart object The .Template object The .Capabilities object The .Files object Helm template functions Helm template control structures Generating release notes Helm template variables Helm template validation The fail function The required function The values.schema.json file Enabling code reuse with named templates and library charts Creating CRDs Post rendering Updating and deploying the Guestbook chart Updating Redis values Updating Guestbook’s deployment template and values.yaml file Deploying the Guestbook chart Summary Further reading Questions Chapter 7: Helm Lifecycle Hooks Technical requirements The basics of a Helm hook Helm hook life cycle Helm hook cleanup Writing hooks in the Guestbook Helm chart Creating the pre-upgrade hook to take a data snapshot Creating the pre-rollback hook to restore the database Executing the life cycle hooks Cleaning up Summary Further reading Questions Chapter 8: Publishing to a Helm Chart Repository Technical requirements Understanding Helm chart repositories Publishing to an HTTP repository Creating a GitHub Pages repository Publishing the Guestbook chart Publishing to an OCI registry Pulling the OCI Guestbook chart Summary Further reading Questions Chapter 9: Testing Helm Charts Technical requirements Setting up your environment Verifying Helm templating Validating template generation locally with helm template Adding server-side validation to chart rendering Linting Helm charts and templates Testing in a live cluster Running the chart test Improving chart tests with the Chart Testing tool Introducing the Chart Testing project Installing the Chart Testing tools Running the lint-and-install command Cleaning up Summary Further reading Questions Part 3: Advanced Deployment Patterns Chapter 10: Automating Helm with CD and GitOps Technical requirements Understanding CI/CD and GitOps CI/CD Taking CI/CD to the next level using GitOps Setting up your environment Installing Argo CD Deploying a Helm chart from a Git repository Deploying an application from a remote Helm chart repository Deploying a Helm chart to multiple environments Cleaning up Summary Questions Chapter 11: Using Helm with the Operator Framework Technical requirements Understanding Kubernetes operators Understanding the Guestbook operator control loop Preparing a local development environment Scaffolding the operator file structure Building the operator image Deploying the Guestbook operator Deploying the Guestbook application Using Helm to manage operators, CRDs, and CRs Cleaning up Summary Further reading Questions Chapter 12: Helm Security Considerations Technical requirements Data provenance and integrity Creating a GPG key pair Verifying Helm downloads Signing and verifying Helm charts Developing secure and stable Helm charts Using secure images Setting resource requests and limits Handling secrets in Helm charts Configuring RBAC rules Accessing secure chart repositories Summary Further reading Questions Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Managing Kubernetes Resources Using Helm: Simplifying how to build, package, and distribute applications for Kubernetes, 2nd Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.