Overview Kubernetes Flashcards

1
Q

Why do you need containers?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What can containers/Docker do?

A
  • each component can run in a separate container
  • with its own libraries/ dependencies
  • all on the same VM and OS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are containers?

A
  • completely isolated environments
  • can have own processes/services/networking interfaces/mounts
  • like VMs, but they share the same OS kernel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do all Operating Systems basically contain or consist of?

A
  • OS kernel
  • set of software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In an Operating System what is the OS kernel responsible for?

A
  • interacting with the underlying hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What makes OS like Fedora and CentOS different from each other?

A
  • same OS Kernel: Linux
  • software is different:
  • UIs, compilers, drivers, developer tools
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does it mean that docker containers share the same kernel?

A

Example: Docker running on an Ubuntu distribution:
- docker can then run a container based on another distribution like fedora, Debian or CentOS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What happens when Docker runs on a OS - Ubuntu distribution and a container runs with different OS-requirement like Windows?

A
  • won’t be able to run a Windows-based container on a Linux-based Host
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How are Containers and Virtual Machines different?

A
  • 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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How are containers and images different from each other?

A

Image:
- package or template, like VM template
- used to create one or more containtainers

Container:
- running instance of an image
- isolated with own processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is container orchestration?

A
  • whole process of automatically deploying and managing containers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Node?

A
  • machine, physical or virtual on which Kuberntes is installed
  • worker machine, where containers will be launched
  • ‘minions’ called in the past
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a Cluster?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Who is responsible for managing a cluster?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What components are installed, when Kubernetes is installed on a system?

A
  • API server
  • etcd service
  • kubelet service
  • Container runtime
  • Controllers
  • Schedulers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the API-Server component responsible for?

A
  • front end for Kubernetes
17
Q

What is the etcd-service component responsible for?

A
  • Key-value store to store all data used to manage the cluster
18
Q

What is the kubelet component responsible for?

A
  • agent
  • responsible for making sure the containers are running on the nodes as expected
19
Q

What is the container runtime component responsible for?

A
  • underlying software to run containers
20
Q

What is the Scheduler component responsible for?

A
  • distributing work or containers among multiple nodes
21
Q

What is the Controller component responsible for?

A
  • noticing and responding when nodes, containers or end-points go down, make decision to bring up new containers
22
Q

How does one server become a master and the other the slave (control plane vs worker)

A
  • 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
23
Q

What is kubectl? What is it used for?

A

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, …

24
Q

What does the kubectl ‘-o’ flag define? Does it need an argument?

A
  • defines the output format
  • yes, arguments can be
  • ‘wide’ for more information
  • ‘name’ for only the name
24
Q

Name a few useful kubectl commands

A
  • 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