Kubernetes Concepts Flashcards

1
Q

You are designing an application, and you want to ensure that the containers are located as close to each other as possible, in order to minimize latency. Which design decision helps meet this requirement?

A

Place the containers in the same Pod.

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

Which Kubernetes component does the kubectl command connect to in order to carry out operations on a cluster?

A

kube-apiserver

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

You have deployed a new Kubernetes Engine regional cluster with four machines in the default pool for the first zone and left the number of zones at the default. How many Compute Engine machines are deployed and billed against your account?

A

Twelve. (Four nodes are deployed in each of three zones. A control plane node is deployed in each zone but it is not billed against your account.)

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

You need to ensure that the production applications running on your Kubernetes cluster are not impacted by test and staging deployments. Which features should you implement and configure to ensure that the resources for your production applications can be prioritized?

A

Configure Namespaces for Test, Staging and Production and configure specific Kubernetes resource quotas for the test and staging Namespaces.

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

When configuring storage for stateful applications, what steps must you take to provide file system storage inside your containers for data from your applications that will not be lost or deleted if your Pods fail or are deleted for any reason?

A

You must create Volumes using network based storage to provide durable storage remote to the Pods and specify these in the Pods.

Documentation here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/

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

You have a new logging and auditing utility that you need to deploy on all of the nodes within your cluster. Which type of controller should you use to handle this task?

A

DaemonSet. DaemonSet ensures that a specific Pod is always running on all or some subset of the nodes. The word “daemon” is a computer science term meaning a non-interactive process. A Kubernetes cluster might use a DaemonSet to ensure that a logging agent like fluentd is running on all nodes in the cluster.

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

You want to deploy multiple copies of your application, so that you can load balance traffic across them. How should you deploy this application’s Pods to the production Namespace in your cluster?

A

Create a Deployment manifest that specifies the number of replicas that you want to run.

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

Why use kubernetes?

A

SSS, AA:
S - Storage orchestration
S - Service discovery and load balancing
S - Self-healing (restarts containers that fail) Secret and configuration management.
A - Automated rollouts and rollbacks
A - Automatic bin packing - (You tell Kubernetes how much CPU and memory (RAM) each container needs. Kubernetes can fit containers onto your nodes to make the best use of your resources.)

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

What is a cluster and what does it consist of?

A
A cluster consists of: CAkkeS
Controller manager - Monitors cluster state
API server - handles commands
kubelet - kubernetes agent
kube-proxy - maintain networks
etcd - database for control plane
Scheduler - places containers on nodes

Below you’ll find the definition of what each does:
https://www.linux.com/news/what-makes-kubernetes-cluster/

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

A deployment has 3 states, progressing, complete, and failed.
What are some reasons a failed state could occur?

A

Images, Quotas, Permissions.

Kubernetes couldn’t pull images for the new pods.

There are not enough of a resource quota on the pod to complete the deployment.

The user who initiated the deployment lacks permissions

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

What is a kubernetes Manifest file? What is it used for?

A

the yml file used to describe the type of object your kubernetes command will create

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

What is a kubernetes object?

A

A yml defined kubernetes entity that will declaratively manage your kubernetes job, ingress and deployment objects, as well as your load balancer services.

(note there are more than just the above objects)
Documentation here: https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/

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

How is storage attached to a pod?

What types of storage options are there?

A

Volumes.
There are persistent and non-persistent volumes.
A persistent volume claim is used to secure a volume for a pod.

Documentation: https://kubernetes.io/docs/concepts/storage/volumes/

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

How do you ensure that data will survive pod scaling?

A
Persistent Volume Claims. 
A PersistentVolumeClaim (PVC) is a request for storage by a user. 

https://kubernetes.io/docs/concepts/storage/persistent-volumes/

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

What are the steps to procure a volume as storage for a pod?

A

Create a PVC, remember the name.

Mount the PVC to a Pod using the same claim name for your PVC.

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