Try Knative: Serverless Kubernetes
In this course, we're going to deploy serverless containerized applications on Kubernetes by using Knative.
Knative is a Kubernetes-based platform for running serverless. Serverless means you can scale your application to 0 running instances but those instances to quickly scale up to N number of instances within a few seconds. Scaling to 0 is fantastic because it allows Kubernetes and Knative to reallocate resources as needed. If you couple that with an LKE autoscaling feature (which will add compute nodes to your cluster), you can have a very robust system with not much financially invested.
The investment for Knative comes in the form of the learning curve to get it running and unlocking continuous delivery/deployment. This article and the Try Knative course are here to help you get started using Knative in production using a managed Kubernetes cluster on Linode's LKE service.
Here's what we're going to cover in this article and the course:
- Using Terraform to create our Kubernetes Cluster on Linode
- Install Knative and Istio
- Configure a Knative Service and Domain Mapping
- Install cert-manager for auto-provisioning of HTTPs certificates
- Configure an Istio Gateway for HTTP and HTTPS requests (ingress)
- Implement Knative service environment variables (both ConfigMap and Secrets)
In this series, we'll learn how to install Knative to a Kubernetes cluster and deploy a containerized application!
Prerequisites
- Watch Terraforming Kubernetes on Linode or have experience with Kubernetes clusters
- Git installed
- Terraform installed
- Kubectl installed
References
- Code on Github
- Blog Post
- Linode $100 Credit
- Experience the Live Demo or Watch the Demo being created
Lessons
1
Welcome
2:04
2
Demo
6:33
3
Requirements
2:54
4
Clone Try Knative Repo
2:30
5
Initialize the Terraform Project
4:34
6
Add Autoscaling to your Kubernetes Cluster
5:20
7
Update Terraform Lifecycle to ignore Autoscaling Changes
5:21
8
Install Knative Serving and Istio
7:55
9
An Example Kubernetes Deployment
4:29
10
Your First Knative Service
7:12
11
Verify Knative Service is Running with Curl
5:31
12
Environment Variables with ConfigMaps
6:16
13
Environment Variables with Kubernetes Secrets
4:49
14
Verify Variables in a Knative Service
7:53
15
Reference Commands for Env Values
7:35
16
Custom Domain Name Prep
2:43
17
Custom Domain Names for Knative
5:03
18
Knative Service URL based on Namespace
3:06
19
Configuring an Istio VirtualService for Domain Routing
12:17
20
Thank you and next steps
1:41