Knative in Action

Book description

Take the pain out of managing serverless applications. Knative, a collection of Kubernetes extensions curated by Google, simplifies building and running serverless systems. Knative in Action guides you through the Knative toolkit, showing you how to launch, modify, and monitor event-based apps built using cloud-hosted functions like AWS Lambda. You’ll learn how to use Knative Serving to develop software that is easily deployed and autoscaled, how to use Knative Eventing to wire together disparate systems into a consistent whole, and how to integrate Knative into your shipping pipeline.

About the Technology
With Knative, managing a serverless application’s full lifecycle is a snap. Knative builds on Kubernetes orchestration features, making it easy to deploy and run serverless apps. It handles low-level chores—such as starting and stopping instances—so you can concentrate on features and behavior.

About the Book
Knative in Action teaches you to build complex and efficient serverless applications. You’ll dive into Knative’s unique design principles and grasp cloud native concepts like handling latency-sensitive workloads. You’ll deliver updates with Knative Serving and interlink apps, services, and systems with Knative Eventing. To keep you moving forward, every example includes deployment advice and tips for debugging.

What's Inside
  • Deploy a service with Knative Serving
  • Connect systems with Knative Eventing
  • Autoscale responses for different traffic surges
  • Develop, ship, and operate software


About the Reader
For software developers comfortable with CLI tools and an OO language like Java or Go.

About the Author
Jacques Chester has worked in Pivotal and VMWare R&D since 2014, contributing to Knative and other projects.

Quotes
A must-have book for serverless computing experts and enthusiasts.
- Pethuru Raj, Reliance Jio Platforms Ltd.

The definitive reference to Knative.
- Julien Pohie, Thoughtworks

If you are thinking about getting your feet wet with distributed software architecture and Kubernetes, I would strongly suggest reading this book.
- Raffaella Ventaglio, CELI - Language Technology

Required reading for folks looking to take their Kubernetes-backed development to the next level. Fresh and fun.
- Conor Redmond, InComm Product Control

Table of contents

  1. inside front cover
  2. Knative in Action
  3. Copyright
  4. dedication
  5. contents
  6. front matter
    1. foreword
    2. preface
    3. acknowledgements
    4. about this book
      1. Who should read this book?
      2. How this book is organized: A roadmap
      3. About the code
      4. liveBook discussion forum
      5. Other online resources
    5. about the author
    6. about the cover illustration
  7. 1 Introduction
    1. 1.1 What is Knative?
      1. 1.1.1 Deploying, upgrading, and routing
      2. 1.1.2 Autoscaling
      3. 1.1.3 Eventing
    2. 1.2 So what?
    3. 1.3 Where Knative shines
      1. 1.3.1 Workloads with unpredictable, latency-insensitive demand
      2. 1.3.2 Stitching together events from multiple sources
      3. 1.3.3 Decomposing monoliths in small increments
    4. 1.4 It’s a hit
      1. 1.4.1 Trouble in paradise
    5. 1.5 Changing things
    6. 1.6 What’s in the Knative box?
      1. 1.6.1 Serving
      2. 1.6.2 Eventing
      3. 1.6.3 Serving and Eventing
    7. 1.7 Keeping things under control
      1. 1.7.1 Loops
      2. 1.7.2 Loops within loops
    8. 1.8 Are you ready?
    9. Summary
    10. References
  8. 2 Introducing Knative Serving
    1. 2.1 A walkthrough
      1. 2.1.1 Your first deployment
      2. 2.1.2 Your second deployment
      3. 2.1.3 Conditions
      4. 2.1.4 What does Active mean?
      5. 2.1.5 Changing the image
      6. 2.1.6 Splitting traffic
    2. 2.2 Serving components
      1. 2.2.1 The controller and reconcilers
      2. 2.2.2 The Webhook
      3. 2.2.3 Networking controllers
      4. 2.2.4 Autoscaler, Activator, and Queue-Proxy
    3. Summary
    4. References
  9. 3 Configurations and Revisions
    1. 3.1 Those who cannot remember the past are condemned to redeploy it
    2. 3.2 The bedtime story version of the history of deployment as a concept
      1. 3.2.1 The Blue/Green deployment
      2. 3.2.2 The Canary deployment
      3. 3.2.3 Progressive deployment
      4. 3.2.4 Back to the future
    3. 3.3 The anatomy of Configurations
      1. 3.3.1 Configuration status
      2. 3.3.2 Taking it all in with kubectl describe
    4. 3.4 The anatomy of Revisions
      1. 3.4.1 Revision basics
      2. 3.4.2 Container basics
      3. 3.4.3 Container images
      4. 3.4.4 The command
      5. 3.4.5 The environment, directly
      6. 3.4.6 The environment, indirectly
      7. 3.4.7 Configuration via files
      8. 3.4.8 Probes
      9. 3.4.9 Setting consumption limits
      10. 3.4.10 Container concurrency
      11. 3.4.11 Timeout seconds
    5. Summary
    6. References
  10. 4 Routes
    1. 4.1 Using kn to work with Routes
    2. 4.2 The anatomy of Routes
    3. 4.3 The anatomy of TrafficTargets
      1. 4.3.1 configurationName and revisionName
      2. 4.3.2 latestRevision
      3. 4.3.3 tag
    4. Summary
  11. 5 Autoscaling
    1. 5.1 The autoscaling problem
    2. 5.2 Autoscaling when there are zero instances
      1. 5.2.1 The Autoscaler panics
    3. 5.3 Autoscaling when there are one or a few instances
    4. 5.4 Autoscaling when there are many instances
    5. 5.5 A little theory
      1. 5.5.1 Control
      2. 5.5.2 Queueing
    6. 5.6 The actual calculation
      1. 5.6.1 To panic, or not to panic, that is the question
    7. 5.7 Configuring autoscaling
      1. 5.7.1 How settings get applied
      2. 5.7.2 Setting scaling limits
      3. 5.7.3 Setting scaling rates
      4. 5.7.4 Setting target values
      5. 5.7.5 Setting decision intervals
      6. 5.7.6 Setting window size
      7. 5.7.7 Setting the panic threshold
      8. 5.7.8 Setting the target burst capacity
      9. 5.7.9 Other autoscalers
    8. 5.8 A cautionary note
    9. Summary
    10. References
  12. 6 Introduction to Eventing
    1. 6.1 The road to CloudEvents
    2. 6.2 The anatomy of CloudEvents
      1. 6.2.1 Required attributes
      2. 6.2.2 Optional attributes
      3. 6.2.3 Extension attributes
    3. 6.3 A word about event formats and protocol bindings
      1. 6.3.1 Structured content mode
      2. 6.3.2 Binary content mode
      3. 6.3.3 Batched content mode
    4. 6.4 A walkthrough
    5. 6.5 The basic architecture of Eventing
      1. 6.5.1 Messaging
      2. 6.5.2 Eventing
      3. 6.5.3 Sources
      4. 6.5.4 Flows
      5. 6.5.5 Duck types
    6. Summary
    7. References
  13. 7 Sources and Sinks
    1. 7.1 Sources
      1. 7.1.1 The anatomy of Sources
      2. 7.1.2 Using kn to work with Sources
    2. 7.2 The Sink
    3. 7.3 The mysterious SinkBinding (and its sidekick, ContainerSource)
      1. 7.3.1 Provisioning and binding are not the same
    4. 7.4 Other Sources
    5. Summary
    6. References
  14. 8 Filtering and Flowing
    1. 8.1 The Broker
    2. 8.2 Filters
      1. 8.2.1 Filtering on custom attributes
      2. 8.2.2 Nice things that Eventing adds for you
    3. 8.3 Sequences
      1. 8.3.1 A walkthrough
    4. 8.4 The anatomy of Sequences
      1. 8.4.1 Step
      2. 8.4.2 Reply
      3. 8.4.3 ChannelTemplate and Channels
      4. 8.4.4 Mixing Sequences and filters
    5. 8.5 Parallels
      1. 8.5.1 A walkthrough
    6. 8.6 Dealing with failures
      1. 8.6.1 Retries and backoffs
      2. 8.6.2 Dead letters
      3. 8.6.3 The bad news
    7. Summary
    8. References
  15. 9 From Conception to Production
    1. 9.1 Turning your software into something runnable
      1. 9.1.1 Always use digests
      2. 9.1.2 Using Cloud Native Buildpacks (CNBs) and the pack tool
    2. 9.2 Getting your software to somewhere it runs
    3. 9.3 Knowing how your software is running
      1. 9.3.1 Logs
      2. 9.3.2 Metrics
      3. 9.3.3 Traces
    4. Summary
    5. References
  16. appendix. Installing Knative for Development
    1. A.1 Installing kubectl and kn
    2. A.2 Installing Knative
  17. index
  18. inside back cover

Product information

  • Title: Knative in Action
  • Author(s): Jacques Chester
  • Release date: March 2021
  • Publisher(s): Manning Publications
  • ISBN: 9781617296642