Kubernetes Interview Questions

Kubernetes Interview Questions | Freshers & Experienced

  • Sharad Jaiswal
  • 11th Dec, 2021
  • 396 Followers

Key Features of Kubernetes

Below are few major features of Kubernetes

Automated Scheduling

Self-Healing Capabilities

Automated rollouts & rollback

Horizontal Scaling & Load Balancing

Offers environment consistency for development

Testing

Production

Kubernetes Interview Questions & Answers;

Q1. What is Kubernetes?

Kubernetes is an open-source platform that automates Linux container operations i.e. it helps in managing the clusters. It is basically used to run modern applications across multiple clusters on cloud services and data centers.

Q2. Enlist few features of Kubernetes?

Features of Kubernetes are:

  • Automated rollouts and rollbacks
  • Storage orchestration
  • Automatic bin packing
  • IPv4/IPv6 dual-stack
  • Self-healing.

Q3. What is a Kubernetes Pod?

Pods in Kubernetes are the smallest and most basic deployable objects. A Pod represents a single instance of a running process in your cluster. It can contain one or more containers.

Q4. What are Containers in Kubernetes?

In Kubernetes, containers are used to package the application and its dependencies together into one succinct manifest along with everything required for it to run, regardless of the environment.

Q5. What is a label in Kubernetes?

In Kubernetes, Labels are key/value pairs that are attached to objects, such as pods so that it can be used to specify relevant attributes of an object for the user.

Q6. Describe etcd in Kubernetes?

In Kubernetes, etcd is a consistent and open-source distributed key-value store used for the purpose of storing critical data and information, so that the distributed system keeps running.

Q7. What is a cluster in Kubernetes?

A cluster is a set of nodes that run containerized applications, that packages an app with its dependencies and services such that it can easily run across multiple platforms.

Q8. What is a controller in Kubernetes?

In Kubernetes, controllers act as a control loop that monitors the Kubernetes API for changes such that it checks the current state and then requests for the changes.

Q9. What is container scheduling in Kubernetes?

In Kubernetes, container scheduling is used to start containers on the most appropriate host and connect them together.

Q10. What is a replica set?

In Kubernetes, a ReplicaSet is used to maintain a stable set of replica Pods running at any given time.

Q11. What is Minikube?

Minikube is a Kubernetes tool that is used to run Kubernetes locally.

Q12. What is a SDN in Kubernetes?

SDN stands for software-defined networking that is used by OpenShift Container Platform to provide a unified cluster network that enables the communication between pods across the OpenShift Container Platform cluster.

Q13. What is Kubelet?

The kubelet is an agent that runs on each node such that it makes sure that containers are running in a Pod.

Q14. What is role of a pause container?

Pause Container is used to hold the network namespace for the pod such that to ensure that there is a network stack to map.

Q15. What is Google Container Engine?

Google Container Engine or GKE is basically a managed, production-ready environment used for running containerized applications within Google's public cloud services.

Q16. What is Heapster?

Heapster is a uniform platform adopted by Kubernetes which is a cluster-wide aggregator of monitoring and performance analysis. It works on all Kubernetes setups and runs as a pod in the cluster.

Q17. Why we need service mesh in Kubernetes?

We need service mesh in Kubernetes because it provides critical observability, reliability, and security features.

Q18. Explain the role of CRD in Kubernetes?

CRD stands for Custom resources definition, it is a powerful feature that enables users to add and use their own objects to the Kubernetes cluster.

Q19. What is a Headless Service?

A headless service is a service with a service IP but it will return the IPs of our associated Pods instead of load-balancing.

Q20. How to provide persistent storage for POD?

We can provide persistent storage for POD by creating a PersistentVolume which is backed by physical storage.

Q21. What are federated clusters?

Federated clusters are the cluster that shares pieces of their configuration which are managed by the host cluster and sent to the member clusters of the federation.

Q22. What is difference between Kubernetes and Docker Swarm?

In Kubernetes, an application can be deployed using a combination of pods, deployments, and services.

In Docker Swarm, applications can be deployed as services in a Swarm cluster.

Q23. What is load balancing on Kubernetes?

Loadbalancing is a method in which the load balancer uses the Kubernetes Endpoints API to track the availability of pods.

Q24. Where is the Kubernetes cluster data stored?

The Kubernetes cluster data is stored in an abstracted storage unit called Volume.

Q25. What are Namespaces in Kubernetes?

In Kubernetes, Namespaces are used for dividing cluster resources between multiple users.

Q26. What are the main components of Kubernetes?

The main components of Kubernetes are:

  • etcd
  • API Server
  • Controller Manager
  • Scheduler
  • Docker
  • Kubelet Service
  • Kubernetes Proxy Service

Q27. What does the nodes status contains?

The node status contains:

  • Addresses
  • Conditions
  • Capacity and Allocatable
  • Info

Q28. How to do maintenance activity on K8 node?

The maintenance activity on the K8 node can be done by Draining the K8s node with the help of kubectl cordon and kubectl drain –ignore-daemon set command and then the maintenance can be done by the following command:

  • kubectl get nodes: to list all the nodes
  • kubectl drain <node name>: drain a particular node

Q29. What is prometheus operator?

Prometheus Operator is an operator that is used as an extension to Kubernetes that manages Prometheus monitoring instances.

Q30. What is init container in Kubernetes, when it can be used?

In Kubernetes, the init container is a specialized container that runs before app containers in a Pod.

About Author :

  • Author of Kubernetes Interview Questions

    Sharad Jaiswal

    My name is Sharad Jaiswal, and I am the founder of Conax web Solutions. My tech stacks are PHP, NodeJS, Angular, React. I love to write technical articles and programming blogs.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.