Notes from episode 12 of TGIK: Exploring serverless with Kubeless
Over the past few months I’ve been trying to learn everything there is to know about Kubernetes. Kubernetes is an amazing technology for deploying and scaling containers though it comes with a cost. It’s an incredibly complex piece of software and there are a ton of bells and whistles to become familiar with. One way that I’ve found for coming up to speed is Joe Beda’s weekly TGIK live broadcast. This occurs each Friday at 4PM EST and is CHOCK full of fantastic information. In episode twelve Joe discusses running serverless applications with kubeless. You can watch it here:
Here are some of my takeways from the episode:
Kubeless is a native serverless framework that lets you run small chunks of code (e.g., a function to perform a map reduce function on a data set and returning the result).
Kubernetes office hours allow you to interact with the gurus in the Kubernetes community. I attended my first session this week and and it was a great learning experience!
Heptio labs developed the eventrouter which allows you to watch for events and push them to user specified locations (called sinks).
Events are stored in etcd.
KubeVirt is a virtual machine management add-on for Kubernetes.
Kubeless uses custom resource definitions (CRDs).
The kubelet command and Kubernetes API server can be different versions because the APIs are versioned and kubectl supports a variety of versions.
You need to define a storage class before provisioning kubeless.
Kubeless utilizes Kafka and Zookeeper under the covers.
Joe mentioned that multiple services can be used to implement some super cool things:
Blue-Green deployments
Canaries
Speciailized request routing
You can show persistent volume claims with the pvc command:
$ kubectl get pvc
Storage classes allow you describe the types of storage available to a cluster. Common examples are “fast” for SSD storage and “slow” for spinning media.
You can view the storage classes with the sc command:
$ kubectl get sc
The storageClassName field defines the storage class to use.
You can define a default storage class to satisfy requests that don’t define a storage class.
Storage classes have cluster-wide scope.
Dynamic storage provisioning allows you to create persistent volumes on the fly.
The etcd service limits config maps to 1MB in size.
Kubeless and kubectl use different formats:
$ kubeless <noun> <verb>
$ kubectl <verb> <noun>
There are several other projects providing Kubernetes serverless solutions:
Fission
OpenFAAS
Kubeless has an ingress command to create the ingress controller used to interact with kubeless.
Kubeless runs code in your namespace and context.
You can show Ingress definitions with kubectl get ingresses command:
$ kubectl get ingresses <name> -o yaml
Horizontal pod autoscaling allows Kubernetes to scale your pods based on the overall system state.
Scaling based on CPU and memory is problematic.
Things I need to learn more about:
What are the pitfalls of scaling based on CPU and memory.
How can you utilize Ingress LoadBalancers outside of a cloud provider.
This article was posted by Matty on 2018-03-10 08:00:00 -0500 -0500