architecture Flashcards
Which are the primary components of Kubernetes architecture?
- Kubernetes control plane nodes
- Kubernetes worker nodes
What elements does Kubernetes control plane have?
- etcd
- Kube-controller-mananger
- cloud-controller-manager
- kube-api-server
- kube-scheduler
What elements does Kubernetes worker nodes have?
- kubelet
- kube-proxy
- container engine
Responsibilities of control plane?
- Scheduling a pod
- Responding to cluster events
- Detecting pods
- Exposing API
- Controlling and Provisioning
Use of control plane components?
-
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.
Which are two options to interact with Kubernetes cluster i.e. API server?
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.
Who communicates with API server?
kubectl and worker nodes communicate with API server.
How many ports does etcd expose?
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.
Does Kubernetes provide autoscaling of worker nodes?
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.
Use of worker node components?
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
What does kubelet depends on?
The kubelet works in terms of a PodSpec
kubernetes.io/docs/reference/command-line-tools-reference/kubelet/
Kubernetes uses https encrypted traffic for internal communication. Which certificate will you use self signed or CA authority?
We must only use self signed certificate, when we want to use it for internal cluster.
What is kubeadm?
- 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
What components
kubeadm installs?
kubeadmin installs:
* on worker-nodes: kube-proxy, kubelet, container engine
* on main-nodes: api-server, controller-manager, scheduler, etcd, cloud-control-manager
What is CNI?
- Container Network Interface
- create overlay network