GettingStartedWithK8S Flashcards

1
Q

What is Kubernetes?

A

Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services that facilitates both declarative configuration and automation.

A tool that helps us manage containers.

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

What does “K8s” mean?

A

A short way of writing the word “Kubernetes.”

The “8” in “K8s” stands for the eight letters between the “K” and the “s” in the word “Kubernetes.”

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

What does Kubernetes do?

A

Builds a layer of abstraction around running containers on multiple servers, called the K8s cluster. It manages running the containers on multiple servers in the K8s cluster.

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

Name some K8s Features

A
  1. Container Orchestration
  2. Application Reliability
  3. Automation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define K8s Container Orchestration

A

The primary purpose of Kubernetes is to dynamically manage containers across multiple host systems.

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

Define K8s Application Reliability

A

Kubernetes makes it easier to build reliable, self-healing, and scalable applications.

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

Define K8s Automation

A

Kubernetes offers a variety of features to help automate the management of your container apps.

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

What are the components of the K8s Architectural Overview?

A
  1. K8s Control Plane
  2. K8s Nodes
  3. K8s Cluster
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the K8s Control Plane?

A

The K8s control plane is a collection of multiple components responsible for managing the K8s cluster itself globally. Essentially, the control plane controls the cluster.

Individual control plane components can run on any machine in the cluster but usually run on dedicated controller machines.

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

What is the kube-api-server?

A

kube-api-server serves the Kubernetes API, the primary frontend interface to the control plane and the cluster itself.

When interacting with your Kubernetes cluster, you will usually do so using the K8s API.

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

Name the 5 components that make up the Kubernetes Control Plane.

A
  1. kube-api-server
  2. Etcd
  3. kube-controller-manager
  4. kube-scheduler
  5. cloud-controller-manager
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Etcd?

A

Etcd is the backend data store for the Kubernetes cluster. It provides high-availability storage for all data relating to the state of the cluster.

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

What is the kube-scheduler?

A

kube-scheduler handles scheduling, the process of selecting an available node in the cluster on which to run containers. Essentially, the kube-scheduler assigns containers to specific worker nodes.

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

What is the kube-controller-manager?

A

kube-controller-manager runs a collection of multiple controller utilities in a single process. These controllers carry out a variety of automation-related tasks within the Kubernetes cluster.

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

What is the cloud-controller-manager?

A

cloud-controller-manager provides an interface between Kubernetes and various cloud platforms. It is only used when using cloud-based resources alongside Kubernetes.

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

What are Kubernetes Nodes?

A

Kubernetes nodes are the machines where the containers managed by the cluster run. A cluster can have any number of nodes.

Various node components manage containers on he machine and communicate with the K8s control plane.

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

Name the components of a Kubernetes Node.

A
  1. Kublet
  2. Container runtime
  3. kube-proxy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the K8s kublet?

A

Kubelet is the Kubernetes agent that runs on each node. It communicates with the control plane and ensures that the containers are run on its node as instructed by the control plane.

Kublet also handles the process of reporting container status and other data about containers back to the control plane.

19
Q

What is a container runtime?

A

The container runtime is not built into Kubernetes. It is a separate piece of software that is responsible for actually running containers on the machine.

Kubernetes supports multiple container runtime implementations. Some popular container runtimes are Docker and containerd.

20
Q

What is the kube-proxy?

A

kube-proxy is a network proxy. It runs on each node and handles some tasks related to providing networking between containers and services in the cluster.

21
Q

What is kubeadm?

A

A tool to simplify setting up a K8s cluster.

22
Q

What is a Namespace?

A

Namespaces are virtual clusters backed by the same physical cluster. Kubernetes objects, such as pods and containers, live in namespaces. Namespaces are a way to separate and organize objects in your cluster.

23
Q

What command would you run to list existing namespaces?

A

kubectl get namespaces

24
Q

What is the name of the namespace that all clusters have?

A

default

The “default” namespace is used when no other namespace is specified.

25
Q

What is the name of the namespace automatically created by kubeadm?

A

kube-system

The “kube-system” namespace contains or is used for system components.

26
Q

How do you specify a particular namespace when using the kubectl command?

A

When using the kubectl command, a specific namespace can be specified by using the “–namespace” flag.

i.e. kubectl get pods –namespace my-namespace

27
Q

Which namespace is used when no namespace is specified in kubectl commands?

A

The “default” namespace.

28
Q

How do you create a namespace?

A

kubectl create namespace my-namespace

29
Q

What command is used to see the pods in the kube-system namespace?

A

kubectl get pods –namespace kube-system

30
Q

What command is used to list pods in all namespaces?

A

kubectl get pods –all-namespaces

31
Q

What command would you use to find the namespace of a particular pod?

A

kubectl get pods –all-namespaces

Listing pods for all namespaces using the “–all-namespaces” flag to the “get pods” kubectl command would provide a list of all pod names in all namespaces that you can then traverse to find out which namespace contained a particular pod.

32
Q

What is a namespace? (Choose one)

  1. An optional label which helps organize Kubernetes objects.
  2. A mechanism for isolating groups of resources within a single cluster.
  3. The unique name given to a Pod.
  4. A name designating a specific physical cluster.
A
  1. A mechanism for isolating groups of resources within a single cluster.
33
Q

Which flags allow you to specify which Namespace you want to interact with when using kubectl?
(Choose 2)

  1. –namespace
  2. -m
  3. –name
  4. -n
A
  1. –namespace
  2. -n
34
Q

What does kubeadm do?

  1. Simplifies the process of building Kubernetes clusters.
  2. Simplifies the process of creating Pods.
  3. Change cluster configuration.
  4. Provides a command-line interface for the Kubernetes API.
A
  1. Simplifies the process of building Kubernetes clusters.
35
Q

What is the primary feature of Kubernetes?

  1. Virtualization
  2. Container image management
  3. Automated Server Provisioning
  4. Container Orchestration
A
  1. Container Orchestration
36
Q

Which flag can you use with kubeadm to supply a custom configuration file?

  1. –config
  2. –config-location
  3. –file
  4. –config.yml
A
  1. –config
37
Q

What does the 8 in k8s stand for?

  1. The maximum number of servers in a cluster.
  2. The 8 letters between K and S in Kubernetes.
  3. The minimum number of servers in a cluster.
  4. The year Kubernetes was first released.
A
  1. The 8 letters between K and S in Kubernetes.
38
Q

What is the Kubernetes control plane?

  1. A collection of components that manage the cluster globally.
  2. The agent that manages containers on a node.
  3. The primary Kubernetes interface.
  4. The application that decides which node to run a container on.
A
  1. A collection of components that manage the cluster globally.
39
Q

What is a Namespace?

  1. The unique name given to a Pod.
  2. An optional label which helps organize Kubernetes objects.
  3. A mechanism for isolating groups of resources within a single cluster.
  4. A name designating a specific physical cluster.
A
  1. A mechanism for isolating groups of resources within a single cluster.
40
Q

In Kubernetes, what is a Namespace?

A

In Kubernetes, a namespace provides a mechanism for isolating groups of resources within a single cluster.

41
Q

In Kubernetes, names of resources need to be unique across namespaces.

A. True
B. False

A

B. False

In Kubernetes, names of resources need to be unique within a namespace, but not across namespaces.

42
Q

In Kubernetes, namespace-based scoping is applicable for cluster-wide objects (e.g. StorageClass, Nodes, PersistentVolumes, etc.)

A. True
B. False

A

B. False

In Kubernetes, namespace-based scoping is applicable only for namespaced objects (e.g. Deployments, Services, etc) and not for cluster-wide objects (e.g. StorageClass, Nodes, PersistentVolumes, etc). Namespaces.

43
Q

Which Kubernetes component manages containers on an individual node?

A. kube-scheduler
B. kubelet
C. kube-controller-manager
D. kube-proxy

A

B. kubelet

The kubelet is the agent that manages containers on each node.