Serverless Architectures with Kubernetes: Create production-ready Kubernetes clusters and run serverless applications on them 1838983279, 9781838983277

Kubernetes has established itself as the standard platform for container management, orchestration, and deployment. By l

440 115 725KB

English Pages 475 Year 2019

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Cover
FM
Copyright
Table of Contents
Preface
Chapter 1: Introduction to Serverless
Introduction to Serverless
Serverless Origin and Manifesto
Serverless Use Cases
Serverless Architecture and Function as a Service (FaaS)
Function as a Service (FaaS)
Exercise 1: Creating an HTTP Function
Kubernetes and Serverless
Exercise 2: Packaging an HTTP Function as a Container
Exercise 3: Parameterized HTTP Functions
Activity 1: Twitter Bot Backend for Bike Points in London
Summary
Chapter 2: Introduction to Serverless in the Cloud
Introduction
Serverless and the Cloud Evaluation Criteria
AWS Lambda
Exercise 4: Creating a Function in AWS Lambda and Invoking It via the AWS Gateway API
Azure Functions
Exercise 5: Creating a Parameterized Function in Azure Functions
Google Cloud Functions
Exercise 6: Creating a Scheduled Function in GCF
Activity 2: Daily Stand-Up Meeting Reminder Function for Slack
Summary
Chapter 3: Introduction to Serverless Frameworks
Introduction
Fn Framework
Exercise 7: Getting Started with the Fn Framework
Exercise 8: Running Functions in the Fn Framework
The Serverless Framework
Exercise 9: Running Functions with the Serverless Framework
Activity 3: Daily Weather Status Function for Slack
Summary
Chapter 4: Kubernetes Deep Dive
Introduction to Kubernetes
Kubernetes Design and Components
Exercise 10: Starting a Local Kubernetes Cluster
Kubernetes Client Tool: kubectl
Exercise 11: Accessing Kubernetes Clusters Using the Client Tool: kubectl
Kubernetes Resources
Pod
Deployment
StatefulSet
Service
Job and CronJob
Exercise 12: Installing a Stateful MySQL Database and Connecting inside Kubernetes
Activity 4: Collect Gold Prices in a MySQL Database in Kubernetes
Summary
Chapter 5: Production-Ready Kubernetes Clusters
Introduction
Kubernetes Setup
Managed Platforms
Turnkey Platforms
Custom Platforms
Google Kubernetes Engine
Exercise 13: Creating a Kubernetes Cluster on GCP
Autoscaling Kubernetes Clusters
Exercise 14: Autoscaling a GKE Cluster in Production
Application Migration in Kubernetes Clusters
Exercise 15: Migrating Applications Running in a GKE Cluster
Activity 5: Minimizing the Costs of Serverless Functions in a GKE Cluster
Summary
Chapter 6: Upcoming Serverless Features in Kubernetes
Introduction to Serverless with Kubernetes
Introduction to Knative
Getting Started with Knative on GKE
Exercise 16: Deploying a Sample Application on Knative
Knative Serving Component
Canary Deployment
Exercise 17: Canary Deployment with Knative
Knative Monitoring
Knative Autoscaler
Exercise 18: Autoscaling with Knative
Google Cloud Run
Exercise 19: Deploying Containers on Google Cloud Run
Introduction to Virtual Kubelet
Exercise 20: Deploying Virtual Kubelet on AKS
Activity 6: Deploy a Containerized Application in a Serverless Environment
Summary
Chapter 7: Kubernetes Serverless with Kubeless
Introduction to Kubeless
Kubeless Architecture
Creating a Kubernetes Cluster
Creating a Kubernetes Cluster with Minikube
Installing Kubeless
Installing the Kubeless Framework
Installing the Kubeless CLI
The Kubeless UI
Kubeless Functions
Creating a Kubeless Function
Deploying the Kubeless Function
Listing the Kubeless Function
Invoking the Kubeless Function
Updating the Kubeless Function
Deleting the Kubeless Function
Exercise 21: Creating Your First Kubeless Function
Kubeless HTTP Triggers
Exercise 22: Creating an HTTP Trigger for a Kubeless Function
Kubeless PubSub Triggers
Exercise 23: Creating a PubSub Trigger for a Kubeless Function
Monitoring a Kubeless Function
Debugging a Kubeless Function
Serverless Plugin for Kubeless
Activity 7: Publishing Messages to Slack with Kubeless
Summary
Chapter 8: Introduction to Apache OpenWhisk
Introduction to OpenWhisk
Running OpenWhisk with IBM Cloud Functions
Exercise 24: Setting Up an IBM Cloud Account
Exercise 25: Installing the IBM Cloud CLI
OpenWhisk Actions
Writing Actions for OpenWhisk
Creating Actions on the OpenWhisk Framework
Listing OpenWhisk Actions
Invoking OpenWhisk Actions
Updating OpenWhisk Actions
Deleting OpenWhisk Actions
Exercise 26: Creating Your First OpenWhisk Action
OpenWhisk Sequences
Exercise 27: Creating OpenWhisk Sequences
OpenWhisk Web Actions
OpenWhisk Feeds, Triggers, and Rules
OpenWhisk CronJob Triggers
Exercise 28: Creating CronJob Triggers
OpenWhisk Packages
Exercise 29: Creating OpenWhisk Packages
Activity 8: Receive Daily Weather Updates via Email
Summary
Chapter 9: Going Serverless with OpenFaaS
Introduction to OpenFaaS
Getting Started with OpenFaas on Your Local Minikube Cluster
OpenFaaS Functions
Creating OpenFaaS Functions
Building OpenFaaS Functions
Pushing the OpenFaaS Function Image
Deploying the OpenFaaS Functions
Listing the OpenFaaS Functions
Invoking OpenFaaS Functions
Deleting OpenFaaS Functions
Exercise 30: Creating an OpenFaaS Function with Dependencies
Deploying and Invoking Functions with OpenFaaS Portal
OpenFaaS Functions with HTML Output
Exercise 31: Returning HTML Based on Path Parameters
OpenFaaS Function Observability
Exercise 32: Installing an OpenFaaS Grafana Dashboard
OpenFaaS Function Autoscaling
Activity 9: OpenFaaS Form Processor
Summary
Appendix
Index

Serverless Architectures with Kubernetes: Create production-ready Kubernetes clusters and run serverless applications on them
 1838983279, 9781838983277

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers