All about DataSince, DataEngineering and ComputerScience
View the Project on GitHub datainsightat/DataScience_Examples
Share compute resources by virtualizing hardware. Smallest entity is a whole server. Full control of hardware, but hard to scale.
Easy to scale, but no control of hardware.
Virtualize operating system. Easy scaling. Kubernetes is a tool to orchestrate containers.
A pod is the smalles deployable component in Kubernetes.
A deployment is a group of replicas of the same pod.
List running pods
$> kubectl get pods
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
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
$> kubectl scale nginx --replicas=3
$> kubectl autoscale nginx --min=10 --max=15 --cpu=80
$> kubectl get pods -l "app=nginx" -o yaml
$> kubectl apply -f nginx-deployment.yaml
$> kubectl get replicasets
$> kubectl get pods
$> kubectl get deployments
$> kubectl get services
Update strategies define how an update is deployed. For example: Rolling Update.
Hybrid architectures allow for on-premise and cloud compute workloads.