Introduction To Kubernetes
Introduction To Kubernetes
Kubernetes
Kubernetes (K8s) – What ?
◦ Kubernetes is an open-source container cluster manager [ swarm ]
◦ originally developed by Google, donated to the Cloud Native Computing Foundation
◦ schedules & deploys containers onto a cluster of machines
◦ e.g. ensure that a specified number of instances of an application are running
◦ provides service discovery, configuration & secrets, ...
◦ provides access to persistent storage
Kubernetes (K8s) – Why ?
◦ It can be run anywhere: on premises & multiple public clouds
◦ Idea is to use Kubernetes as an abstraction layer
◦ migrate to containerized applications managed by Kubernetes & use only the Kubernetes API
◦ can then run out-of-the-box on any Kubernetes cluster
◦ Avoid vendor lock-in as much as possible by not using any vendor specific APIs or services
Kubernetes (K8s) – Why ?
Kubernetes (K8s)
◦ A single API for accessing multiple resources
◦ On-premises resources & public clouds used in exactly the same way
Kubernetes (K8s) - Federations
◦ Provides the standard Kubernetes API, but applies across multiple Kubernetes clusters
◦ New, but eventually should make it easy to overflow from on-premise resources to public clouds
Kubernetes (K8s) – Install and Test
Kubernetes (K8s)
Kubernetes (K8s)
Kubernetes (K8s) – Turn off firewalld
Kubernetes (K8s)
Kubernetes (K8s)
Kubernetes (K8s)
Kubernetes (K8s) – Deploy
◦ kubectl version
◦ kubectl run testme –image nginx
◦ kubectl get pods
◦ kubectl scale deploy/testme –replicas 2
◦ kubectl logs deploy/testme –follow --tail 1
◦ kubectl expose deplot/testme --port 7777
◦ kubectl get service
The END of DAY 3