The document provides an overview of cloud platforms and Kubernetes. It introduces cloud computing concepts like virtualization, deployment models, and service models. It then discusses Kubernetes, including concepts like pods, services, labels, replica sets, and deployments. It demonstrates how Kubernetes manages and scales containers across nodes and provides a demo of Kubernetes on a Raspberry Pi cluster and Google Container Engine.
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Google Cloud Platform and Kubernetes
1. Cloud Platform and Kubernetes
Google Developer Group Aarhus Meet-up
Thursday, 28th April 2016
Martin Jensen & Kasper Nissen
www.rpi-cloud.com
@mrjensens @phennex
2. Views and opinions are our own.
We do not work for, nor do we speak on behalf of .
8. - “Cloud computing refers to applications and services that run on a distributed network using
virtualized resources and accessed by common Internet protocols and networking
standards.” - B. Sosinsky, The Cloud Computing Bible
- Key enabling concepts
- Abstraction: Cloud computing abstracts the details of system implementation from
users and developers
- Virtualization: Cloud computing virtualizes systems by pooling and sharing
resources
- Cloud types
- Deployment models: Public, Private, Hybrid, Community
- Service models: IaaS, PaaS, SaaS, (CaaS)
What is Cloud Computing?
Source: “The Cloud Computing Bible”, B.Sosinsky, page 10
9. - On-demand self-service
- Broad network access
- Resource pooling
- Rapid elasticity
- Measured service
- Lower costs
- Ease of utilization
- Quality of Service
- Reliability
- Outsourced IT Management
Benefits of Cloud Computing?
Source: “The Cloud Computing Bible”, B.Sosinsky, page 17
10. - More suitable for large organizations
- Less customizable
- Latency
- Privacy and security
Disadvantages of Cloud Computing?
Source: “The Cloud Computing Bible”, B.Sosinsky, page 17
16. resilience
or resiliency
[ri-zil-yuh ns, -zil-ee-uh ns]
noun
1. the power or ability to return to the original form, position, etc., after being bent,
compressed, or stretched: elasticity.
2. ability to recover readily from illness, depression, adversity, or the like; buoyancy
Source: http://www.dictionary.com/browse/resilience
19. The fallacies of distributed computing
1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4.The network is secure
5. Topology doesn’t change
6. There is one administrator
7. Transport cost is zero
8. The network is homogeneous
20. - Application level
- Synchronous/Asynchronous architecture (request/response, message queues)
- Apply circuit breakers at integration points
- Rather degradation of service than failures
- Manage timeouts
- Bulkheads
- Health checks
- Infrastructure level
- Fault tolerance
- Infrastructure that detects failures
What can we do?
43. Google Container Engine
Fully Managed
Container Engine is fully managed by Google reliability
engineers, ensuring your cluster is available and up-to-
date.
Private Container Registry
Google Container Registry makes it easy to store and
access your private Docker images.
Scalable
Easily adjust the cluster resources allocated to your
containers, or the size of your container cluster, as
your application's requirements change.
Docker Support
Container Engine supports the common Docker
container format.
Logging
Enable Google Cloud Logging with a single checkbox,
making it easy to gain insight into how your
application is running
Hybrid Networking
Reserve an IP address range for your container cluster,
allowing your cluster IPs to coexist with private
network IPs via Google Cloud VPN.
Source: https://cloud.google.com/container-engine/
44. Google Container Registry
Container Engine
Use container images with Container Engine with no
authentication setup.
Advanced Authentication
Easily integrate with your favorite continuous
integration, continuous delivery, and container
orchestration systems with native Docker Login
support.
Container Tags
Add and remove image tags with a simple click in the
web UI.
Docker V2 Registry API Support
Push and pull Docker images to your private Container
Registry using the V2 API.
Docker CLI Integration
Pull container images from Container Registry using
the standard Docker command line interface.
Regional Repositories
Get the fastest possible pull times by storing your
images close to your Compute Engine instances in
Europe, Asia, or US regional Cloud Storage buckets.
Search Images
Quickly search for images by name and tag.
Nearline Storage Integration
Archival storage of images in Cloud Storage Nearline
buckets.
Source: https://cloud.google.com/container-registry/
45. Kubernetes - Infrastructure For Everyone Else
Kubernetes is an open-source system for automating deployment, operations,
and scaling of containerized applications.
#GIFEE
50. Machine utilization
- Machine shapes
- Workload shapes
- Bin packing problem
Where should we deploy this workload?
2.5GB
1Core
Source: bit.ly/1PrkwoN
52. “Containerization transforms the data center
from being machine-oriented to being
application-oriented”
Burns et al., Borg, Omega, and Kubernetes, 2016
Source: research.google.com/pubs/pub44843.html
53. - Greek for “pilot” or “helmsman of a ship”
- Runs and manages containers
- Builds on Googles experiences running a hyper-scale webplatform for more than 10 years.
- Inspired by Googles internal Cluster Management and scheduling platform, “Borg”
- Supports multiple cloud and bare-metal environments
- 100% Open source, written in Go
What is Kubernetes?
Source: https://youtu.be/_xNFt7FsWaA
56. Everything at Google runs in containers
- Gmail, Web search, …
- MapReduce, batch, …
- GFS, Colossus, …
- Even Google’s Cloud Platform:
VMs run in containers
In fact, launches over 2 billion containers per week.
Google and Containers
60. Pods
- Kubernetes uses nested containers
- The outer-most one provides a pool of resources, and is called a pod
- The inner ones provide deployment isolation
- Kubernetes regularizes things and always run an application container inside a top-level
pod, even if the pod contains a single container
- “A pod is a collection of containers that are tightly bound”, Brian Dorsey
- The atom of scheduling for containers
- Runs on the same virtual/physical host
63. Pod networking
- Pods have IPs which are routable
- Pods can communicate directly with each other
- Even across nodes
- No brokering of Port Numbers
- Many solutions
- Flannel (what we use in the Raspberry Pi Cluster)
- Cloud Providers
66. Services
- A service has a static IP and a DNS entry
- Acts as a load-balancer and knows how to route traffic to pods
- Load balances incoming request across constituent pods
69. Labels
- Labels are simple key/value pairs
- Kubernetes connects things together with labels
- Only grouping mechanism in Kubernetes
- Reduces coupling
Web server
Container
track=staging
app=webserver
tier=frontend
Pod
72. ReplicaSets
- A Replica Set ensures that a specified number of pods “replicas” are running at any given
time.
- Replica Set is the next-generation Replication Controller
- The only difference right now is the selector support (set-based support)
- Use deployments to control your Replica Sets
75. Deployments
- Deployment is a higher-level concept that manages replica sets, pods and provides
declarative updates to pods along with a lot of other useful features
- You only need to describe the desired state in a Deployment object, and the Deployment
controller will change the actual state to the desired state at a controlled rate for you
- Deploying a new version will result in a rolling-update, where Kubernetes will replace one
pod at a time until all are running the latest version.
84. Scale (auto)
- Horizontal Pod Autoscaler allows you to automatically scale the number of pods in a
deployment based on observed CPU utilization.
- The autoscaler is implemented as a Kubernetes API resource and controller.
- The resource describes behavior of the controller
- The controller periodically adjusts the number of replicas in a deployment to match the
observed average CPU utilization to the target specified by the user.
85. Scale (auto)
Pod 1
Container
type=FE
Pod 2
Container
type=FE
Pod N
Container
type=FE
version=3 version=3 version=3
Deployment
Scale
…
Horizontal
Pod
Autoscaler
kubectl autoscale deployment foo --max=5 --cpu-percent=80
89. cloud.google.com
- kubernetes.io
- Documentation, great samples, etc.
- Slack: http://slack.k8s.io
- Github: https://github.com/kubernetes/kubernetes
- Pricing:
60 days free trial. You get $300 in credit.
https://cloud.google.com/free-trial/
91. Thank you
Google Developer Group Aarhus Meet-up
Thursday, 28th April 2016
Martin Jensen & Kasper Nissen
www.rpi-cloud.com
@mrjensens @phennex
92. References
- Book: “The Cloud computing bible”, Sosinsky, B.
- Link: “Microservices - a definition of this new architectural term”, Fowler, M., Lewis, J.
- martinfowler.com/articles/microservices.html
- Link: “Borg, Omega, and Kubernetes”, Burns, B. et al.
- http://research.google.com/pubs/pub44843.html
- Link: “Introduction to Docker”
- pointful.github.io/docker-intro/