Learn Helm

Book description

A comprehensive introduction to automated application deployment on Kubernetes for beginners

Key Features

  • Effectively manage applications deployed in Kubernetes using Helm
  • Learn to install, upgrade, share, and manage applications deployed in Kubernetes
  • Get up and running with a package manager for Kubernetes

Book Description

Containerization is currently known to be one of the best ways to implement DevOps. While Docker introduced containers and changed the DevOps era, Google developed an extensive container orchestration system, Kubernetes, which is now considered the frontrunner in container orchestration. With the help of this book, you'll explore the efficiency of managing applications running on Kubernetes using Helm.

Starting with a short introduction to Helm and how it can benefit the entire container environment, you'll then delve into the architectural aspects, in addition to learning about Helm charts and its use cases. You'll understand how to write Helm charts in order to automate application deployment on Kubernetes. Focused on providing enterprise-ready patterns relating to Helm and automation, the book covers best practices for application development, delivery, and lifecycle management with Helm.

By the end of this Kubernetes book, you will have learned how to leverage Helm to develop an enterprise pattern for application delivery.

What you will learn

  • Develop an enterprise automation strategy on Kubernetes using Helm
  • Create easily consumable and configurable Helm charts
  • Use Helm in orchestration tooling and Kubernetes operators
  • Explore best practices for application delivery and life cycle management
  • Leverage Helm in a secure and stable manner that is fit for your 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 application development on Kubernetes. Although no prior knowledge of Helm is required, basic knowledge of Kubernetes application development will be useful.

Table of contents

  1. Learn Helm
  2. Why subscribe?
  3. Contributors
  4. About the authors
  5. About the reviewer
  6. Packt is searching for authors like you
  7. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
      1. Code in action
      2. Download the color images
      3. Conventions used
    5. Get in touch
    6. Reviews
  8. Section 1: Introduction and Setup
  9. Chapter 1:
  10. Understanding Kubernetes and Helm
    1. From monoliths to modern microservices
    2. What is Kubernetes?
      1. Container Orchestration
      2. High availability
      3. Scalability
      4. Active community
    3. Deploying a Kubernetes application
      1. Deployment
      2. Services
      3. PersistentVolumeClaim
    4. Approaches in resource management
      1. Imperative and declarative configuration
    5. Resource configuration challenges
      1. The many types of Kubernetes resources
      2. Keeping the live and local states in sync
      3. Application life cycles are hard to manage
      4. Resource files are static
    6. Helm to the rescue!
      1. Understanding package managers
      2. The Kubernetes package manager
    7. Summary
    8. Further reading
    9. Questions
  11. Chapter 2:
  12. Preparing a Kubernetes and Helm Environment
    1. Technical requirements
    2. Preparing a local Kubernetes environment with Minikube
      1. Installing Minikube
      2. Installing VirtualBox
      3. Configuring VirtualBox as the designated hypervisor
      4. Configuring Minikube resource allocation
      5. Exploring the basic usage
    3. Setting up Kubectl
      1. Installing Kubectl
      2. Installing Helm
    4. Configuring Helm
      1. Adding upstream repositories
      2. Adding plugins
      3. Environment variables
      4. Tab completion
      5. Authentication
      6. Authorization/RBAC
    5. Summary
    6. Further reading
    7. Questions
  13. Chapter 3:
  14. Installing your First Helm Chart
    1. Technical requirements
    2. Understanding the WordPress application
    3. Finding a WordPress chart
      1. Searching for WordPress charts from the command line
      2. Viewing the WordPress chart in a browser
      3. Showing the WordPress chart information from the command line
    4. Creating a Kubernetes environment
    5. Installing the WordPress chart
      1. Creating a values file for configuration
      2. Running the installation
      3. Inspecting your release
    6. Additional installation notes
      1. The -n flag
      2. The HELM_NAMESPACE environment variable
      3. Choosing between --set and --values
    7. Accessing the WordPress application
    8. Upgrading the WordPress release
      1. Modifying the Helm values
      2. Running the upgrade
      3. Reusing and resetting values during an upgrade
    9. Rolling back the WordPress release
      1. Inspecting the WordPress history
      2. Running the rollback
    10. Uninstalling the WordPress release
    11. Cleaning up your environment
    12. Summary
    13. Further reading
    14. Questions
  15. Section 2: Helm Chart Development
  16. Chapter 4:
  17. Understanding Helm Charts
    1. Technical requirements
    2. Understanding the YAML format
      1. Defining key-value pairs
      2. Value types
    3. Understanding chart templates
      1. Go templating
    4. Understanding chart definitions
      1. Required fields
      2. Managing chart dependencies
      3. Downloading dependencies
      4. Conditional dependencies
      5. Overriding and referencing values from a child chart
      6. Importing values with import-values
    5. Life cycle management
      1. The basics of a Helm hook
      2. Hook execution
      3. Advanced hook concepts
    6. Documenting a Helm chart
      1. The LICENSE file
      2. The templates/NOTES.txt file
    7. Packaging a Helm chart
    8. Summary
    9. Further reading
    10. Questions
  18. Chapter 5:
  19. Building Your First Helm Chart
    1. Technical requirements
    2. Understanding the Guestbook application
    3. Setting up the environment
    4. Creating a Guestbook Helm chart
      1. Scaffolding the initial file structure
      2. Evaluating the chart definition
      3. Adding a Redis chart dependency
      4. Modifying the values.yaml file
    5. Improving the Guestbook Helm chart
      1. Creating pre-upgrade and pre-rollback life cycle hooks
      2. Adding input validation
    6. Publishing the Guestbook chart to a chart repository
      1. Creating a chart repository
      2. Publishing the Guestbook Helm chart
      3. Adding your chart repository
    7. Cleaning up
    8. Summary
    9. Further reading
    10. Questions
  20. Chapter 6:
  21. Testing Helm Charts
    1. Technical requirements
    2. Setting up your environment
    3. Verifying Helm templating
      1. Validating template generation locally with helm template
      2. Linting Helm charts and templates
    4. Testing in a live cluster
      1. Creating the chart tests
      2. Running the chart tests
    5. Improving chart tests with the chart testing project
      1. Introducing the chart testing project
      2. Installing the chart testing tools
    6. Cleaning up
    7. Further reading
    8. Questions
  22. Section 3: Adanced Deployment Patterns
  23. Chapter 7:
  24. Automating Helm Processes Using CI/CD and GitOps
    1. Technical requirements
    2. Understanding CI/CD and GitOps
      1. CI/CD
      2. Taking CI/CD to the next level using GitOps
    3. Setting up our environment
    4. Creating a CI pipeline to build Helm charts
      1. Designing the pipeline
      2. Understanding Jenkins
      3. Understanding the pipeline
      4. Running the pipeline
    5. Creating a CD pipeline to deploy applications with Helm
      1. Designing the pipeline
      2. Updating the environments
      3. Understanding the pipeline
      4. Running the pipeline
    6. Cleaning up
    7. Summary
    8. Further reading
    9. Questions
  25. Chapter 8:
  26. Using Helm with the Operator Framework
    1. Technical requirements
    2. Understanding Kubernetes Operators
    3. Creating a Helm operator
      1. Setting up the environment
      2. Scaffolding the operator file structure
      3. Building the operator and pushing it to Quay
      4. Deploying the Guestbook Operator
      5. Deploying the Guestbook application
    4. Using Helm to manage Operators and CRs
    5. Cleaning up your Kubernetes environment
    6. Summary
    7. Further reading
    8. Questions
  27. Chapter 9:
  28. Helm Security Considerations
    1. Technical requirements
    2. Data provenance and integrity
      1. Creating a GPG keypair
      2. Verifying Helm downloads
    3. Signing and verifying Helm charts
    4. Developing secure Helm charts
      1. Using secure images
      2. Handling secrets in Helm charts
    5. Configuring RBAC rules
    6. Accessing secure chart repositories
    7. Summary
    8. Further reading
    9. Questions
  29. ASSESSMENTS
    1. Chapter 1: Understanding Kubernetes and Helm
    2. Chapter 2: Preparing a Kubernetes and Helm Environment
    3. Chapter 3: Installing Your First Helm Chart
    4. Chapter 4: Understanding Helm Charts
    5. Chapter 5: Building Your First Helm Chart
    6. Chapter 6: Testing Helm Charts
    7. Chapter 7: Automating Helm Processes Using CI/CD and GitOps
    8. Chapter 8: Using Helm with the Operator Framework
    9. Chapter 9: Helm Security Considerations
  30. Other Books You May Enjoy

Product information

  • Title: Learn Helm
  • Author(s): Andrew Block, Austin Dewey
  • Release date: June 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781839214295