Overview Kubernetes Flashcards
Why do you need containers?
Different used technologies for Web Server, Database, Messaging, Orchestration etc have different required
- libraries
- dependencies
- OS
- hardware infrastructure
- long setup time
- different Dev/Test/Prod environments
What can containers/Docker do?
- each component can run in a separate container
- with its own libraries/ dependencies
- all on the same VM and OS
What are containers?
- completely isolated environments
- can have own processes/services/networking interfaces/mounts
- like VMs, but they share the same OS kernel
What do all Operating Systems basically contain or consist of?
- OS kernel
- set of software
In an Operating System what is the OS kernel responsible for?
- interacting with the underlying hardware
What makes OS like Fedora and CentOS different from each other?
- same OS Kernel: Linux
- software is different:
- UIs, compilers, drivers, developer tools
What does it mean that docker containers share the same kernel?
Example: Docker running on an Ubuntu distribution:
- docker can then run a container based on another distribution like fedora, Debian or CentOS
What happens when Docker runs on a OS - Ubuntu distribution and a container runs with different OS-requirement like Windows?
- won’t be able to run a Windows-based container on a Linux-based Host
How are Containers and Virtual Machines different?
- VMs use a Hypervisor on top of the host OS
- an OS is part of each VM
- Docker runs on top of host OS
- containers running on Docker must be compatible to host OS but don’t have their own OS with them, only libraries, dependencies etc
How are containers and images different from each other?
Image:
- package or template, like VM template
- used to create one or more containtainers
Container:
- running instance of an image
- isolated with own processes
What is container orchestration?
- whole process of automatically deploying and managing containers
What is a Node?
- machine, physical or virtual on which Kuberntes is installed
- worker machine, where containers will be launched
- ‘minions’ called in the past
What is a Cluster?
- a set of Nodes grouped together
- if one node failes, application is still accessible from other nodes
- workload can be balanced between the multiple nodes within a cluster
Who is responsible for managing a cluster?
- the Master/Control plane node is another node with Kubernetes installed in it
- configured as the master
- responsible for the actual orchestration of the worker nodes
What components are installed, when Kubernetes is installed on a system?
- API server
- etcd service
- kubelet service
- Container runtime
- Controllers
- Schedulers
What is the API-Server component responsible for?
- front end for Kubernetes
What is the etcd-service component responsible for?
- Key-value store to store all data used to manage the cluster
What is the kubelet component responsible for?
- agent
- responsible for making sure the containers are running on the nodes as expected
What is the container runtime component responsible for?
- underlying software to run containers
What is the Scheduler component responsible for?
- distributing work or containers among multiple nodes
What is the Controller component responsible for?
- noticing and responding when nodes, containers or end-points go down, make decision to bring up new containers
How does one server become a master and the other the slave (control plane vs worker)
- master has the kube-apiserver
- that makes it the master
- worker has the kubelet agent, responsible for interacting with the master
Master has - etcd store
- controller
- scheduler
What is kubectl? What is it used for?
Kube Command line Tool
Or Kube Control
Used for:
- deploy and manage applications on a Kubernetes cluster
- get information, get the status of other nodes in cluster, …
What does the kubectl ‘-o’ flag define? Does it need an argument?
- defines the output format
- yes, arguments can be
- ‘wide’ for more information
- ‘name’ for only the name
Name a few useful kubectl commands
- kubectl run <name>: to deploy an application in the cluster</name>
- kubectl cluster-info: view information about the cluster
- kubectl get nodes: list all nodes part of the cluster