End-to-End Automation with Kubernetes and Crossplane

Book description

A complete journey to automating infrastructure provisioning and cloud-native application deployment

Key Features

  • Leverage Crossplane and Kubernetes for a unified automation experience of infrastructure and apps
  • Build a modern self-service infrastructure platform abstracting recipes and in-house policies
  • Clear guidance on trade-offs to manage Kubernetes configuration and ecosystem tools

Book Description

In the last few years, countless organizations have taken advantage of the disruptive application deployment operating model provided by Kubernetes. With Crossplane, the same benefits are coming to the world of infrastructure provisioning and management. The limitations of Infrastructure as Code with respect to drift management, role-based access control, team collaboration, and weak contract make people move towards a control-plane-based infrastructure automation, but setting it up requires a lot of know-how and effort.

This book will cover a detailed journey to building a control-plane-based infrastructure automation platform with Kubernetes and Crossplane. The cloud-native landscape has an overwhelming list of configuration management tools that can make it difficult to analyze and choose. This book will guide cloud-native practitioners to select the right tools for Kubernetes configuration management that best suit the use case. You'll learn about configuration management with hands-on modules built on popular configuration management tools such as Helm, Kustomize, Argo, and KubeVela. The hands-on examples will be patterns that one can directly use in their work.

By the end of this book, you'll be well-versed with building a modern infrastructure automation platform to unify application and infrastructure automation.

What you will learn

  • Understand the context of Kubernetes-based infrastructure automation
  • Get to grips with Crossplane concepts with the help of practical examples
  • Extend Crossplane to build a modern infrastructure automation platform
  • Use the right configuration management tools in the Kubernetes environment
  • Explore patterns to unify application and infrastructure automation
  • Discover top engineering practices for infrastructure platform as a product

Who this book is for

This book is for cloud architects, platform engineers, infrastructure or application operators, and Kubernetes enthusiasts who want to simplify infrastructure and application automation. A basic understanding of Kubernetes and its building blocks like Pod, Deployment, Service, and Namespace is needed before you can get started with this book.

Table of contents

  1. End-to-End Automation with Kubernetes and Crossplane
  2. Contributors
  3. About the author
  4. About the reviewer
  5. 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
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Share Your Thoughts
  6. Part 1: The Kubernetes Disruption
  7. Chapter 1: Introducing the New Operating Model
    1. The Kubernetes journey
    2. Characteristics of the new operating model
      1. Team collaboration and workflows
      2. Control theory
      3. Interoperability
      4. Extensibility
      5. Architecture focus
      6. Open source, community, and governance
    3. The next Kubernetes use case
    4. Summary
  8. Chapter 2: Examining the State of Infrastructure Automation
    1. The history of infrastructure automation
    2. The need for the next evolution
      1. The limitations of IaC
      2. A Kubernetes operating model for automation
      3. Multi-cloud automation requirements
    3. Crossplane as a cloud control plane
    4. A universal control plane
    5. Open standards for infrastructure vendors
      1. Wider participation
      2. The cloud provider partnerships
    6. Other similar projects
    7. Summary
  9. Part 2: Building a Modern Infrastructure Platform
  10. Chapter 3: Automating Infrastructure with Crossplane
    1. Understanding Custom Resource Definitions and custom controllers
      1. Adding a new CRD
      2. Working with the CRD
    2. Understanding the Crossplane architecture
      1. Managed resources
      2. Providers
      3. Composite resources
      4. Crossplane core
    3. Installing Crossplane
    4. Installing and configuring providers
      1. Setting up a cloud account
      2. Installing a provider
      3. Configuring the provider
    5. Multiple provider configuration
    6. An example of POSTGRES provisioning
    7. Summary
  11. Chapter 4: Composing Infrastructure with Crossplane
    1. Feeling like an API developer
    2. How do XRs work?
      1. XRD
      2. Composition
      3. Claim
    3. Postprovisioning of an XR
      1. Readiness check
      2. Patch status
      3. Propagating credentials back
    4. Preprovisioned resources
    5. Building an XR
      1. The infrastructure API requirement
      2. Creating the XRD
      3. Providing implementation
      4. Provisioning the resources with a claim
    6. Troubleshooting
    7. Summary
  12. Chapter 5: Exploring Infrastructure Platform Patterns
    1. Evolving the APIs
      1. API implementation change
      2. Hands-on journey with composition revision
      3. API contract changes
      4. Non-breaking changes
      5. Version upgrade
      6. Version upgrade with breaking changes
    2. Nested and multi-resource XRs
      1. PatchSets
    3. XRD detailed
      1. Naming the versions
      2. The openAPIV3Schema structure
      3. The additional parameter of an attribute
      4. Printer columns
    4. Managing external software resources
      1. Unifying the automation
    5. Summary
  13. Chapter 6: More Crossplane Patterns
    1. AWS provider setup
      1. Creating an AWS account and IAM user
      2. Creating the Kubernetes secret
      3. AWS provider and ProviderConfig setup
    2. Managing dependencies
      1. Resource reference within and nested XR
      2. Referring to an outside resource
    3. Secret propagation hands-on
    4. Helm provider hands-on
    5. Defining API boundaries
    6. Alerts and monitoring
      1. Enabling Prometheus to scrape metrics
      2. Setting up monitoring alerts
      3. Enabling the Grafana dashboard
    7. More troubleshooting patterns
    8. Summary
  14. Chapter 7: Extending and Scaling Crossplane
    1. Building a new provider
    2. XRM detailed
      1. Configuration fidelity
      2. Spec and status configuration
      3. Naming the custom and external resource
      4. Configuration ownership
      5. Sensitive input and output fields
    3. Framework to build a provider
    4. Packaging and distribution of XR/Claim
      1. Packaging and distribution
      2. Installing and using the configuration
    5. Testing the configurations
      1. Installing KUTTL
      2. KUTTL test setup
      3. TDD
    6. Multi-tenant control plane patterns
      1. Multi-tenancy with a single cluster
      2. Multi-tenancy with multiple clusters
    7. Summary
  15. Part 3:Configuration Management Tools and Recipes
  16. Chapter 8: Knowing the Trade-offs
    1. Unified automation scope
    2. Complexity clock, requirements, and patterns
      1. The configuration complexity clock
      2. Configuration management requirements
      3. Patterns and trade-off
    3. Open Application Model
      1. KubeVela, the OAM implementation
    4. Specialized and extendable abstraction
      1. Specialized abstraction
      2. Extendable abstraction
    5. Impact of change frequency
      1. XRM change frequency
    6. Summary
  17. Chapter 9: Using Helm, Kustomize, and KubeVela
    1. Application configuration management capabilities
    2. Using Helm for application deployment
      1. Working with an existing chart
    3. Hands-on chart development
      1. Chart generation
    4. Customizing configurations with Kustomize
    5. Deploying application workloads with KubeVela
      1. Anatomy of a KubeVela application definition
    6. Summary
  18. Chapter 10: Onboarding Applications with Crossplane
    1. The automation requirements
    2. The solution
    3. Preparing the control plane
      1. The GCP provider
      2. The GitLab provider
      3. Helm and Kubernetes provider setup
    4. Automating the application deployment environment
    5. The repository and CI setup
      1. GitLab configuration
      2. The onboarding XR/claim API
    6. The deployment dependencies
    7. API boundary analysis
    8. Summary
  19. Chapter 11: Driving the Platform Adoption
    1. Why we need an infrastructure platform as a product
    2. Understanding customers’ needs
      1. Product development practices
      2. Self-service
      3. Collaborative backlog management
    3. The platform product life cycle and team interaction
    4. The OAM personas
    5. Summary
    6. Why subscribe?
  20. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts

Product information

  • Title: End-to-End Automation with Kubernetes and Crossplane
  • Author(s): Arun Ramakani
  • Release date: August 2022
  • Publisher(s): Packt Publishing
  • ISBN: 9781801811545