2. Outline
● What is Cloud Native?
● Container orchestration: Kubernetes
● Kubernetes application package
● Going Serverless: Kubeless
3. Outline
● What is Cloud Native?
● Container orchestration: Kubernetes
● Kubernetes application package
● Going Serverless: Kubeless
4. What is Cloud Native
- Cloud offers innumerable advantages: easier deployment, on-demand
scalability, rolling updates, better resource optimization…
- However, traditional enterprise application design does not exploit all this
potential
- Cloud-Native → Have the Cloud as the main target platform when designing
5. What is Cloud Native (II)
1. Containerized. Each part (applications, processes, etc) is packaged in its own
container. This facilitates reproducibility, transparency, and resource isolation.
2. Dynamically orchestrated. Containers are actively scheduled and managed to
optimize resource utilization.
3. Microservices oriented. Applications are segmented into microservices. This
significantly increases the overall agility and maintainability of applications.
Properties:
6. A new ecosystem: CNCF
Cloud-Native Computing Foundation: Cloud-Native technology ecosystem where applications
can be ported between different public and private clouds.
Projects: Companies:
9. But that is not enough...
● Automatic deployments
● Continous Integration
● Zero downtime
● Failover mechanisms
● Load Balancing
● Monitoring
● Dynamic scalability
● Role-Based Access Control
● Rolling updates
Next step:
Container
orchestration
We want:
10. Outline
● What is Cloud Native?
● Container orchestration: Kubernetes
● Kubernetes application package
● Going Serverless: Kubeless
11. What is Kubernetes?
Kubernetes is an open-source system
for automating deployment, scaling,
and management of containerized
applications.
More about Kubernetes...
• Open-source, based on 15 years of
container expertise at Google.
• Rich core API for all key primitives
• Cluster Federation, RBAC, Quotas, Network
policies, etc.
• Fastest growing project on GitHub
15. Basic Objects: Deployments
Pods are normally scheduled using Deployments. It is a higher level
object that allows:
- Replica management
- Pod scaling
- Rolling updates
- Rollback to a previous version
- Clean-up policies
- Pause/Resume
ReplicaSet
Deployment: wordpress
Pod
Replicas10.10.10.2
10.10.10.3
17. Basic Objects: Services
Define a set of pods that provide a micro-service. They provide a stable
virtual endpoint for ephemeral Pods in your cluster, key to linking
applications together
10.10.10.2
10.10.10.3
Service
wordpress
31.120.4.2
Deployment: wordpress
ReplicaSet
18. apiVersion: v1
kind: Service
metadata:
name: frontend
labels:
app: wordpress
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: http
selector:
app: wordpress
Example Service
19. Example: Deploying to Kubernetes
$ kubectl create -f ./mariadb-deployment.yaml
deployment "mariadb" created
$ kubectl create -f ./mariadb-service.yaml
service "mariadb" created
$ kubectl create -f ./wordpress-deployment.yaml
deployment "wordpress" created
$ kubectl create -f ./wordpress-service.yaml
service "wordpress" created
20.
21. Some examples of other k8s objects
Secrets
PodSecurityPolicy
Security
PersistentVolume
PersitentVolume
Claim
Persistence
Namespaces
ResourceQuota
Limits
Resource Mgmt
Role
RoleBinding
ClusterRole
RBAC
Job
CronJob
Job Mgmt.
. . .
22. Outline
- What is Cloud Native?
- Container orchestration: Kubernetes
- Kubernetes application package
- Going Serverless: Kubeless
23. Problems with Managing Resources
Boilerplate when
developing
manifests Upgrades and
configuration
changes require
manual editing
No history for
releases
Difficult to share
publicly or with
members of your
team
Need tooling to hook
into release lifecycle
24. Need a tool to package a group of
resources as a single unit
25. Solutions available
Helm Ksonnet
• A Kubernetes package manager
• Packages are called Helm Charts.
• The chart is a collection of k8s manifest
templates to create an instance of a
Kubernetes application
● Declarative application management
● Typed templating system for the
Kubernetes application developer
● Offers proper IDE experience (plugins
for VSCode and Web Interface)
● It support richer and more configurable
solutions
● Can be integrated with Helm.
26. Outline
● What is Cloud Native?
● Container orchestration: Kubernetes
● Kubernetes application package
● Going Serverless: Kubeless
27. “Serverless can also mean applications where some
amount of server-side logic is still written by the
application developer but unlike traditional architectures is
run in stateless compute containers that are
event-triggered, ephemeral (may only last for one
invocation), and fully managed by a 3rd party”
--Mike Roberts
(https://martinfowler.com/articles/serverless.html)
Serverless Definition
28. Kubeless: Kubernetes-Native Serverless Computing
• Kubernetes-native serverless
implementation
• Functions allow for quick and easy
application integrations
• PubSub capabilities via Kafka
• Open Source and non-affiliated
• https://github.com/kubeless/kubeless
29. Get Started on Kubernetes with Bitnami
1
2
3
4
5
6
7
Javier’s contact info: jsalmeron@bitnami.com
Bitnami-base Containers: www.bitnami.com/containers
How-to Setup K8s on Oracle Cloud: http://bitn.am/2rzyQ8e
Get Helm: github.com/kubernetes/helm & kubeapps.com
Get Ksonnet: https://github.com/ksonnet/ksonnet-lib
Get Kubeless: github.com/kubeless/kubeless
Bitnami documentation for Containers: docs.bitnami.com/containers
8 Bitnami documentation on Kubernetes: docs.bitnami.com/kubernetes