Build Serverless Apps on Kubernetes with Knative: Build, deploy, and manage serverless applications on Kubernetes

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Learn how to deploy and maintain high-performing, resilient serverless applications using Knative Description As cloud computing has become increasingly important in modern development workflows, developers have begun to look for ways to harness its full potential. Serverless architecture is one such approach, and Knative is a powerful and versatile solution for deploying and managing serverless containers. This book is a comprehensive guide to Knative serverless containers. It begins by introducing the core concepts of serverless architecture and its benefits. Then, it provides an in-depth exploration of Knative, its components, and how it fits within the broader Kubernetes ecosystem. The book demonstrates how to build, deploy, and manage serverless containers using Knative through practical examples and case studies. It covers topics such as setting up a development environment, creating custom serverless applications, integrating with other cloud-native tools and services, and best practices for monitoring, logging, and troubleshooting. Toward the end, the book delves into advanced topics such as scaling, performance optimization, and security. By the book's end, you can run serverless applications on Kubernetes using Knative. What you will learn ● Get familiar with the core concepts of serverless architecture, the Knative project, and its components. ● Learn how to set up a development environment for Knative. ● Learn how to build and deploy Knative Functions effortlessly. ● Build enterprise-grade apps using Knative components such as Serving and Eventing. ● Optimize the performance and scalability of your serverless applications. Who this book is for Whether you're a current or aspiring tech/IT professional, a student, or someone who wants to start or advance their career in serverless architecture, this book is for you.

Author(s): Amit Deshpande, Anuj Gupta, Ashish Saxena
Publisher: BPB Publications
Year: 2023

Language: English
Pages: 364

1. Serverless and Knative in a Nutshell

Introduction

Structure

Objectives

Introduction to Serverless

Serverless

How serverless works

Key advantages of serverless

Serverless should be considered for

Key limitations/shortcomings of serverless

Scenarios not suited for serverless

Serverless 1.0 - Function-as-a-Service

Serverless 2.0 - Serverless Containers

Introduction to Knative

Knative Serving

Knative Eventing

Knative features

Conclusion

Multiple choice questions

Answers

Key terms

2. Installation and Configuration of Knative – Part I

Introduction

Structure

Objectives

Kubernetes cluster

Explore and understand various methods to get Kubernetes cluster

Install kubectl CLI

Validation of the Kubernetes cluster

Kubernetes package manager

Understanding Helm and its need

Helm installation

Verify Helm installation

Istio

Why Istio for Knative

Istio installation

Verify Istio installation

Knative installation

Explore and understand various approaches to installing Knative

Install Knative

Install Knative Serving with YAML

Install Knative Eventing with YAML

Install Knative CLI

Validate Knative installation

Conclusion

Multiple choice questions

Answers

Key terms

3. Installation and Configuration – Part II

Introduction

Structure

Objective

Broker

Brokers for Knative and its need

Installation options for Kafka broker

Installation and validation of Kafka

GitOps with Argo CD

Understanding GitOps and its need

Installation of Argo CD

Observability

Understanding observability and its significance in Knative

Understanding the Knative observability stack

Loki

Installing Loki

Prometheus

Installing Prometheus

Jaeger

Installing Jaeger

Grafana

Conclusion

Multiple choice questions

Answers

Key terms

4. Knative Functions – An Overview

Introduction

Structure

Objectives

Knative Functions

Installing Knative functions

Creating function

Building function

Local build

Remote build

Conclusion

Multiple choice questions

Answers

Key terms

5. Knative Serving

Introduction

Structure

Objectives

Knative Serving

Benefits of Knative Serving

Case study – Online order processing system

Functional architecture

Deployment architecture

Flow diagram

Service Implementation

Order service

Product service

Customer service

Build and deploy

Order service

Product and customer service

Validate services

Knative Serving – Services runtime behavior

Conclusion

Multiple choice questions

Answers

Key terms

6. Knative Eventing

Introduction

Structure

Objectives

Knative Eventing

Knative Eventing patterns

Source to Sink pattern

Broker and Trigger pattern

Case study – Online order processing system

Functional architecture

Deployment architecture

Order processing system with Source to Sink pattern

Service implementation

Build and deploy services

Event source installation

Create event sources

Validate services

Order processing system with Broker and Triggers Pattern

Service implementation

Build and deploy services

Broker installation

Create event source

Create triggers

Validate services

Conclusion

Multiple choice questions

Answers

Key terms

7. Scaling and Routing

Introduction

Structure

Objectives

Deployment of use case on remote Kubernetes cluster

Autoscaling in Knative

About Knative Pod autoscaler

Autoscaling configurations

Global settings configuration

Applying global settings – Order processing system

Per-Revision settings configuration

Metrics and targets

Traffic management

Revisions

Understanding Revisions with order service

Traffic splitting and switching

Deployment strategies

Blue-green deployment strategy

Apply blue-green deployment strategy

Canary deployment strategy

Apply canary deployment strategy

A/B testing deployment strategy

Apply A/B testing deployment strategy

Conclusion

Multiple choice questions

Answers

Key terms

8. Knative Best Practices

Introduction

Structure

Objectives

Manage Knative Services deployment

Manage Service deployment with GitOps powered by Argo CD

Installation of Argo CD

Access Argo CD web interface

Setup Git repository for deployment through Argo CD

Add Git repository for Argo CD

Deployment of Services with Argo CD

Continuous deployment with Argo CD

Observability for Knative services

Observability tools - Loki, Prometheus, Jaeger, and Grafana

Configure Loki for logs

Access Grafana web interface

Visualize logs with Grafana

Integrate Jaeger for distributed tracing

Set up and configure Prometheus for Metrics Collection

Configure alerts using Grafana

Conclusion

Multiple choice questions

Answers

Key terms

Index