ICT role in 21st century education and it's challenges.
Kubernetes iInterview Questions And Answers
1. Kubernetes interview questions
What is Kubernetes?
Kubernetes is a portable, extensible open-source platform for managing containerized
workloads and services, that facilitates both declarative configuration and automation.
What is kube-apiserver?
Component on the master that exposes the Kubernetes API. It is the front-end for the
Kubernetes control plane.
It is designed to scale horizontally – that is, it scales by deploying more instances. See Building
High-Availability Clusters.
2. Consistent and highly-available key value store used as Kubernetes’ backing store for all cluster
data.
What is kube-scheduler?
Component on the master that watches newly created pods that have no node assigned, and
selects a node for them to run on.
Factors taken into account for scheduling decisions include individual and collective resource
requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data
locality, inter-workload interference and deadlines.
What is kube-controller-manager?
Component on the master that runs controllers.
Logically, each controller is a separate process, but to reduce complexity, they are all compiled
into a single binary and run in a single process.
These controllers include:
Node Controller: Responsible for noticing and responding when nodes go down.
Replication Controller: Responsible for maintaining the correct number of pods for every
replication controller object in the system.
Endpoints Controller: Populates the Endpoints object (that is, joins Services & Pods).
Service Account & Token Controllers: Create default accounts and API access tokens for new
namespaces.
What is Node ?
A node is the smallest unit of computing hardware in Kubernetes. It is a representation of a
single machine in your cluster. In most production systems, a node will likely be either a physical
machine in a datacenter, or virtual machine hosted on a cloud provide
What is kubelet ?
An agent that runs on each node in the cluster. It makes sure that containers are running in a
pod.
3. The kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures
that the containers described in those PodSpecs are running and healthy. The kubelet doesn’t
manage containers which were not created by Kubernetes.
What is kube-proxy ?
kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the
Kubernetes Service concept.
kube-proxy maintains network rules on nodes. These network rules allow network
communication to your Pods from network sessions inside or outside of your cluster.
kube-proxy uses the operating system packet filtering layer if there is one and it’s available.
Otherwise, kube-proxy forwards the traffic itself.
Container Runtime
The container runtime is the software that is responsible for running containers.
Kubernetes supports several container runtimes: Docker, containerd, cri-o, rktlet and any
implementation of the Kubernetes CRI (Container Runtime Interface).
What is a Pod?
A Pod (as in a pod of whales or pea pod) is a group of one or more containers (such as Docker
containers), with shared storage/network, and a specification for how to run the containers.
What are the features of Pod ?
Every Pod has a unique IP.
This Pod IP is shared by all the containers in this Pod, and it’s routable from all the other Pods
A huge benefit of this IP-per-pod model is there are no IP or port collisions with the underlying
host. And we don’t have to worry about what port the applications use
What is pause container ?
Pause containers running on your Kubernetes nodes are called sandbox containers, whose only
job is to reserve and hold a network namespace (netns) which is shared by all the containers in a
4. pod. This way, a pod IP doesn’t change even if a container dies and a new one in created in it’s
place
What is ReplicationController & Replicasets?
Replication Controller is a Kubernetes resource that ensures its pods are always kept running. If
the pod disappears for any reason, such as in the event of a node disappearing from the cluster
or because the pod was evicted from the node, the ReplicationController notices the missing
pod and creates a replacement pod.
ReplicationController constantly monitors the list of running pods and makes sure the actual
number of pods of a “type” always matches the desired number.
A ReplicaSet behaves exactly like a ReplicationController, but it has more expressive pod
selectors. Whereas a ReplicationController’s label selector only allows matching pods that
include a certain label, a ReplicaSet’s selector also allows matching pods that lack a certain label
or pods that include a certain label key, regardless of its value.
What is daemonSets?
DaemonSets run only a single pod replica on each node, whereas ReplicaSets distribute them
around the entire cluster randomly. Cases include infrastructure-related pods that perform
system-level operations.
What is Deployment?
A deployment is an object in Kubernetes that lets you manage a set of identical pods.
Without a deployment, you’d need to create, update, and delete a bunch of pods manually.
With a deployment, you declare a single object in a YAML file. This object is responsible for
creating the pods, making sure they stay up to date, and ensuring there are enough of them
running
You can also easily autoscale your applications using a Kubernetes deployment.
running applications on Kubernetes cluster uses a deployment.
5. It’s what you use to scale, roll out, and roll back versions of your applications.
With a deployment, you tell Kubernetes how many copies of a Pod you want running. The
deployment takes care of everything else.
What is Namespaces?
Namespaces are intended for use in environments with many users spread across multiple
teams, or projects. For clusters with a few to tens of users, you should not need to create or
think about namespaces at all. Start using namespaces when you need the features they
provide.
Namespaces allow you to isolate objects into distinct groups, which allows you to operate only
on those belonging to the specified namespace.