Learning Helm

Book description

Get up to speed with Helm, the preeminent package manager for the Kubernetes container orchestration system. This practical guide shows you how to efficiently create, install, and manage the applications running inside your containers. Helm maintainers Matt Butcher, Matt Farina, and Josh Dolitsky explain how this package manager fits into the Kubernetes ecosystem and provide an inside look at Helm's design and best practices.

More than 70% of the organizations that work with Kubernetes use Helm today. While the Helm community provides thousands of packages, or charts, to help you get started, this book walks developers and DevOps engineers through the process of creating custom charts to package applications. If you have a working understanding of Kubernetes, you're ready to go.

  • Explore primary features including frequently used Helm commands
  • Learn how to build and deploy Helm charts from scratch
  • Use Helm to manage complexity and achieve repeatable deployments
  • Package an application and its dependencies for easy installation
  • Manage the entire lifecycle of applications on Kubernetes
  • Explore ways to extend Helm to add features and functionality
  • Learn features for testing, handling dependencies, and providing security

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Who Should Read This Book
    2. Why We Wrote This Book
    3. Navigating This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. 1. Introducing Helm
    1. The Cloud Native Ecosystem
      1. Containers and Microservices
      2. Schedules and Kubernetes
    2. Helm’s Goals
      1. From Zero to Kubernetes
      2. Package Management
      3. Security, Reusability, and Configurability
    3. Helm’s Architecture
      1. Kubernetes Resources
      2. Charts
      3. Resources, Installations, and Releases
      4. A Brief Note About Helm 2
    4. Conclusion
  3. 2. Using Helm
    1. Installing and Configuring the Helm Client
      1. Installing a Prebuilt Binary
      2. Guidance on Building from Source
      3. Working with Kubernetes Clusters
      4. Getting Started with Helm
    2. Adding a Chart Repository
    3. Searching a Chart Repository
    4. Installing a Package
      1. Configuration at Installation Time
    5. Listing Your Installations
    6. Upgrading an Installation
      1. Configuration Values and Upgrades
    7. Uninstalling an Installation
      1. How Helm Stores Release Information
    8. Conclusion
  4. 3. Beyond the Basics with Helm
    1. Templating and Dry Runs
      1. The --dry-run Flag
      2. The helm template Command
    2. Learning About a Release
      1. Release Records
      2. Listing Releases
      3. Find Details of a Release with helm get
    3. History and Rollbacks
      1. Keeping History and Rolling Back
    4. A Deep Dive into Installs and Upgrades
      1. The --generate-name and --name-template Flags
      2. The --create-namespace Flag
      3. Using helm upgrade --install
      4. The --wait and --atomic Flags
      5. Upgrading with --force and --cleanup-on-fail
    5. Conclusion
  5. 4. Building a Chart
    1. The Chart Creation Command
    2. The Chart.yaml File
    3. Modifying Templates
      1. The Deployment
    4. Using the Values File
      1. Container Images
      2. Exposing Services
      3. Resource Limits
    5. Packaging the Chart
    6. Linting Charts
    7. Conclusion
  6. 5. Developing Templates
    1. The Template Syntax
      1. Actions
      2. Information Helm Passes to Templates
      3. Pipelines
      4. Template Functions
      5. Methods
      6. Querying Kubernetes Resources In Charts
      7. if/else/with
      8. Variables
      9. Loops
    2. Named Templates
    3. Structuring Your Templates for Maintainability
    4. Debugging Templates
      1. Dry Run
      2. Getting Installed Manifests
      3. Linting Charts
    5. Conclusion
  7. 6. Advanced Chart Features
    1. Chart Dependencies
      1. Conditional Flags for Enabling Dependencies
      2. Importing Values from Child to Parent Charts
    2. Library Charts
    3. Schematizing Values Files
    4. Hooks
    5. Adding Tests to Charts
      1. Helm Test
      2. Chart Testing Tool
    6. Security Considerations
    7. Custom Resource Definitions
    8. Conclusion
  8. 7. Chart Repositories
    1. The Repository Index
      1. An Example of a Chart Repository Index
      2. Generating an Index
      3. Adding to an Existing Index
    2. Setting Up a Chart Repository
      1. A Simple Chart Repository with Python
      2. Securing a Chart Repository
      3. Real-World Example: Using GitHub Pages
    3. Using Chart Repositories
      1. Adding a Repository
      2. Downloading Charts
      3. Listing Repositories
      4. Updating Repositories
      5. Removing a Repository
    4. Experimental OCI Support
      1. Enabling OCI Support
      2. Running a Local Registry
      3. Logging In to a Registry
      4. Logging Out of a Registry
      5. Storing a Chart in the Cache
      6. Listing Charts in the Cache
      7. Exporting a Chart from the Cache
      8. Pushing a Chart to the Registry
      9. Pulling a Chart from the Registry
      10. Removing a Chart from the Cache
    5. Related Projects
      1. ChartMuseum
      2. Harbor
      3. Chart Releaser
      4. S3 Plugin
      5. GCS Plugin
      6. Git Plugin
  9. 8. Helm Plugins and Starters
    1. Plugins
      1. Installing Third-Party Plugins
      2. Custom Subcommands
      3. Building a Plugin
      4. plugin.yaml
      5. Hooks
      6. Downloader Plugins
      7. Execution Environment
      8. Shell Completion
    2. Starters
      1. Converting a Chart to a Starter
      2. Making Starters Available to Helm
      3. Using Starters
    3. Extending Helm Further
  10. A. Chart API Versions
    1. API Version 2
      1. The Chart.yaml File
      2. The Chart.lock File
    2. API Version 1 (legacy)
      1. The Chart.yaml File
      2. The requirements.yaml File (Legacy)
      3. The requirements.lock File (Legacy)
  11. B. Chart Repository API
    1. index.yaml
      1. The index.yaml Format
      2. When Is index.yaml Downloaded?
      3. When Is the Cached Version of index.yaml Used?
    2. .tgz Files
      1. When Are .tgz Files Downloaded?
    3. .prov Files
      1. When Are .prov Files Downloaded?
  12. Index

Product information

  • Title: Learning Helm
  • Author(s): Matt Butcher, Matt Farina, Josh Dolitsky
  • Release date: January 2021
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492083658