architecture Flashcards

1
Q

Which are the primary components of Kubernetes architecture?

A
  • Kubernetes control plane nodes
  • Kubernetes worker nodes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What elements does Kubernetes control plane have?

A
  • etcd
  • Kube-controller-mananger
  • cloud-controller-manager
  • kube-api-server
  • kube-scheduler
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What elements does Kubernetes worker nodes have?

A
  • kubelet
  • kube-proxy
  • container engine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Responsibilities of control plane?

A
  • Scheduling a pod
  • Responding to cluster events
  • Detecting pods
  • Exposing API
  • Controlling and Provisioning
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Use of control plane components?

A
  • Cloud Controller Manager
    * used by cloud providers which enables them to create VM and load balancer instances in case of managed Kubernetes service. Normally Kube Controll Manager is used instead.
  • Kube Controller Manager
    * replication controller
    * endpoints controller
    * namespace controller
    * serviceaccounts controller
  • Kube Scheduler
    * It manages assignment of worker node to corresponding pod.
  • etcd Key-Value store
    * etcd is a data store. stores the configuration
  • Kube API server
    * It acts as the front end to the control panel. Kubernetes exposes a set of APIs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which are two options to interact with Kubernetes cluster i.e. API server?

A

Either use curl commands to send requests to Kube-API-Server, but that is not feasible for end user to remember all APIs.Other option is to use “kubectl” it is CLI to interact with Kubernetes cluster.

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

Who communicates with API server?

A

kubectl and worker nodes communicate with API server.

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

How many ports does etcd expose?

A

etcd uses 2 ports. etcd cluster internally uses 2379 portetcd exposes 2380 port for external world.So kube-api-server will communicate with etcd using 2380 port.

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

Does Kubernetes provide autoscaling of worker nodes?

A

No, autoscaling of nodes is not provided by Kubernetes. But autoscaling of pods is very much part of Kubernetes. While a lot of cloud providers do provide autoscaling of nodes.

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

Use of worker node components?

A

kubelet
* Is Agent service runs on and every worker node.
* gathers information about health of the nodes
* creates pods on nodes.

kube-proxy
* expose the pod to world. Portmapper, NAT, TCP/UDP forwarding
* Service can also load balance between multiple pods.

Container engine
* download the image and creating the container

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

What does kubelet depends on?

A

The kubelet works in terms of a PodSpec

kubernetes.io/docs/reference/command-line-tools-reference/kubelet/

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

Kubernetes uses https encrypted traffic for internal communication. Which certificate will you use self signed or CA authority?

A

We must only use self signed certificate, when we want to use it for internal cluster.

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

What is kubeadm?

A
  • kubeadm bootstraps a Kubernetes cluster (best practices)
  • cluster pass Kubernetes conformance tests.
  • Kubeadm supports other cluster lifecycle functions: upgrades, downgrade

kubeadm helps you bootstrap a minimum viable Kubernetes cluster that con

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

What components
kubeadm installs?

A

kubeadmin installs:
* on worker-nodes: kube-proxy, kubelet, container engine
* on main-nodes: api-server, controller-manager, scheduler, etcd, cloud-control-manager

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

What is CNI?

A
  • Container Network Interface
  • create overlay network
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are namespaces in Kubernetes?

A
  • … are like logical partitions in kubernetes (project, customer).
  • … are buldled group of pods
  • … default namespaces: default, kube-system, kube-node-lease, kube-public
17
Q

Command to view all namespaces

A

kubectl get ns

18
Q

Command to view all pods in all namespaces

A

kubectl get pods --all-namespaces

19
Q

Command to view all pods in particular namespace

A

kubectl get pods -n myNamespace

20
Q

Where are the pods created? Main node or worker nodes?

A

worker nodes.

21
Q

Command to view nodes in Kubernetes cluster?

A

kubectl get nodes

22
Q

Command to view detailed information of pods like IP etc

A

kubectl get pods -o wide