DataScience_Examples

All about DataSince, DataEngineering and ComputerScience

View the Project on GitHub datainsightat/DataScience_Examples

Containers in the Cloud

Kubernetes Engine

Compute Options

Compute Options

IaaS

Share compute resources by virtualizing hardware. Smallest entity is a whole server. Full control of hardware, but hard to scale.

Iaas

PaaS (App Engine)

Easy to scale, but no control of hardware.

Paas

Containers

Virtualize operating system. Easy scaling. Kubernetes is a tool to orchestrate containers.

Container

Kubernetes, Google Kubernetes Engine

GKE

Create Pods

A pod is the smalles deployable component in Kubernetes.

pod

A deployment is a group of replicas of the same pod.

kubernetes

List running pods

$> kubectl get pods

Expose Pods to Internet

Expose pods to the internet using a loadbalancer. Kubernetes creates a service with a fixed IP address for the pods.

$> kubectl expose deployments nginx --port=80 --type=LoadBalancer

LoadBalancer

A service groups a set of pods together and provides a stable endpoint, like a public IP address. Pods have their internal IP addresses, but these addresses are not stable. Services create a stable entrypoint to the pods.

$> kubectl get services

Scale Application

$> kubectl scale nginx --replicas=3

Scaling

Autoscaling

$> kubectl autoscale nginx --min=10 --max=15 --cpu=80

Configuration File

$> kubectl get pods -l "app=nginx" -o yaml
$> kubectl apply -f nginx-deployment.yaml

Monitoring

$> kubectl get replicasets
$> kubectl get pods
$> kubectl get deployments
$> kubectl get services

Updating

Update strategies define how an update is deployed. For example: Rolling Update.

Hybrid and Multi-Cloud Computing (Anthos)

Modular Applications

Hybrid architectures allow for on-premise and cloud compute workloads.

Athos