Skip to content
FOSS TechNix
  • DevOps
    • Ansible
    • Jenkins
    • GitLab
    • Terraform
  • Linux
    • Ubuntu
    • CentOS
  • Database
  • Scripting
  • Monitoring
  • Containerization
    • Docker
    • Kubernetes
  • Tutorials
    • Git
    • MySQL
    • MongoDB
FOSS TechNix

FOSS TechNix

  • DevOps
    • Ansible
    • Jenkins
    • GitLab
    • Terraform
  • Linux
    • Ubuntu
    • CentOS
  • Database
  • Scripting
  • Monitoring
  • Containerization
    • Docker
    • Kubernetes
  • Tutorials
    • Git
    • MySQL
    • MongoDB

20 Real Time Kubernetes Interview Questions and Answers

Updated: March 17, 2020October 27, 2020 by FOSS TechNix

In this article, We are going to cover Real time Kubernetes Interview Questions and Answers for Freshers and Experienced Candidate.

kubernetes interview questions and answers

Kubernetes Interview Questions and Answers

1. What is Kubernetes

Kubernetes is one of the Leading open source Container Orchestration Engine. It is used to automatic cluster deployment, scaling and manage containerized applications.

2. What is difference between Docker Swarm and Kubernetes

Docker SwarmKubernetes
It is Clustering for Docker ContainerIt is Container Orchestration
Setup is EasySetup is Hard
Application deployment using Pods, Deployments and ServiceApplication deployment using only Service
Auto scaling is Not PossibleAuto scaling is possible
It has no GUI DashboardIt has GUI Dashboard
It supports logging and monitoring using ELK Stack,Grafana,Influx,etc.It does not support

3. What is Kubeadm

Kubeadm helps for installing and configuring Kubernetes cluster using command line.

4. What are Kubeadm commands ?

Command NamePurpose
kubeadm initUsed on Master node and It is used to initialize and configure any node as a master node.
kubeadm joinUsed on worker node and It is used to initialize and configure any node as worker node.
kubeadm tokenIt is used to genrate token.
kubeadm versionIt used to check kubeadm version.

5. What are Kubernetes Cluster components on Master node

API Server, Scheduler, Controller Manager, ETCD

6. What are Kubernetes Cluster components on Worker node

Kubelet, Kubeproxy, Pods, Container

7. What is API Server

It is used to exposing various API’s. It is used to create,delete and update any object inside the cluster using kubectl command. API objects can be pods,containers,deployments,services..etc.

8. What is Scheduler ?

Scheduler is responsible for physically scheduling pods across multiple nodes, depending upon when we submit requirement to API server, scheduler schedules pod accordingly.

9. What is Controller Manager?

It is responsible overall health of entire cluster such as no of nodes insides the  cluster, up and running status as per specification.

10. What is ETCD

etcd is light weight key-value database, it stores information like about current state of cluster,..etc.

11. What is Worker node in Kubernetes?

Worker node can be any Physical Server or Virtual Machine where containers are deployed , containers can be docker,rocket,.etc.

12. What is Kubelet ?

Kubelet is primary agent which runs on each worker node.It ensures containers are running in pod.

13. What is Kubeproxy?

It is core Networking component of Kubernetes cluster, it is responsible for entire network configuration, it maintains distributed network across all containers, pods and nodes.

14. What is Pod?

Pod is scheduling unit in Kubernetes, it consists of one or more container. With the help of pod we can deploy one or more container.

15. What are the different types of services in Kubernetes ?

Below are different types of services in Kubernetes

Cluster IP –   It is used to expose the service on internal IP within cluster.

Node Port – It is used to expose the service from outside.

Load Balancer – It creates external load balancer and assigns external IP to service.

External Name Creating – It is used expose the service using name.

16. What is the difference between deployment and service in Kubernetes ?

Deployment is an object in Kubernetes, using Deployment we can create and manage pods using replica set from template.

Deployment manages creating Pods using of Replica Sets

Service is responsible to allow network access to a set of pods.

17. What is the difference between pod and deployment in Kubernetes?

Pod is scheduling unit in Kubernetes, it consists of one or more container. With the help of pod we can deploy one or more container.

Deployment is an object in Kubernetes, using Deployment we can create and manage pods using replica set from template.

Both are objects in the Kubernetes API

18. What is the difference between config map and secrets in Kubernetes?

Config maps stores application configuration in a plain text format.

Secrets store sensitive data like password in an encrypted format

19. What is namespace in Kubernetes?

Using namespace, we can logically organize objects in the cluster like pod and deployments. When you create Kubernetes cluster , default, kube-system and kube-public namespace are available.

20. What is ingress in Kubernetes?

Ingress is a collection of routing rules for external services running in a Kubernetes cluster.

21. What is Namespace in Kubernetes/k8s ?

It is Kubernetes objects which is used to create multiple virtual clusters within same physical cluster.

We can deploy Pods, deployment, service within each Virtual Cluster called as Kubernetes Namespace.

22. What is use of Namespace in Kubernetes ?

Suppose you have Dev, QA and Prod Environment in your project and you want separate each environment in same cluster and deploy pods, deployments and services also.

In this scenario you can separate these resource in by creating Namespaces for Dev,QA,Prod and create pods, deployments, services.

23. What is ingress in Kubernetes ?

Ingress it is a Kubernetes objects which allows access to your Kubernetes services from outside/external.

Using Ingress we can expose pod’s port like 80 ,443 from outside network of Kubernetes over internet.

24. What are the different types of Ingress Controller in Kubernetes

Below are some most used Ingress controllers on Kubernetes Cluster

  1. Nginx Ingress Controller
  2. AWS ALB
  3. Traefik
  4. Azure Application Gateway
  5. HA Proxy
  6. Contour
  7. Istio

25. What is Replication Controller in Kubernetes ?

A Replication Controller ensures that a specified number of pod replicas are running at any given time. In other words, a Replication Controller makes sure that a pod or a homogeneous set of pods is always up and available.

26. What is ReplicaSet’s in Kubernetes ?

A ReplicaSet’s purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods. The ReplicaSets are also known as next generation replication controller.

ReplicaSets checks whether the target pod is already managed by another controller as well (like a Deployment or another ReplicaSet).

27. What is the Difference between Kubernetes Replication Controllers and ReplicaSets

Replication Controller and Replica Set do almost the same thing. Both of them ensure that a specified number of pod replicas are running at any given time.

The difference comes with the usage of selectors to replicate pods. Replica Set use Set-Based selectors which gives more flexibility while replication controllers use Equity-Based selectors.

28. Why we need replication in Kubernetes ?

A container or pod may crash because of multiple reasons. The main purpose of using Replication is Reliability, Load Balancing, and Scaling. It ensures that the pre-defined pods always exists.

To understand this in an easier manner lets take an example ->

Lets assume we are running our application on a single pod. What if for some reason our application crashes and the pod fails. Users will no longer be able to access our application.

To prevent users from losing access to our application we would like to have more than one instances of our application running at the same time. That way if one pod fails we still have our application running on the other one. The replication controller helps us run multiple instances of a single pod in the Kubernetes cluster. Thus providing high availability.

Conclusion:

We have covered, Kubernetes Interview Questions and Answers for Freshers and Experienced Candidate. If you need any support please comment.

Related Articles:

Jenkins Interview Questions for DevOps Engineer

50 Real Time Docker Interview Questions and Answers

How to Install Docker on Windows 10

How To Setup Kubernetes Cluster Using Kubeadm on Ubuntu

Reference:

Kubernetes Tutorial

Sharing is Caring:

0 Shares
  • Facebook 0
  • Twitter
  • LinkedIn
  • Email
  • More
FOSS TechNix

FOSS TechNix (Free,Open Source Software's and Technology Nix*) founded in 2019 is a community platform where you can find How-to Guides, articles for DevOps Tools,Linux and Databases.

Leave a Comment Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • File Handling in Python with Examples
  • How to Install AWS CLI on Ubuntu 20.04/18.04/16.04 LTS
  • Present Tense Meaning in Marathi – वर्तमान काळ
  • Python Exception Handling with Examples
  • How to Install AWS CLI on Windows 10

About FOSS TechNix

FOSS TechNix (Free ,Open Source Softwares and Technology Nix*) is a community site where you can find How-to Guides, Articles,Tips and Tricks for DevOps Tools,Linux ,Databases,Clouds and Automation.

Site Links

  • About Us
  • Privacy Policy
  • Contact Us
  • Terms and Conditions

Tutorials

  • Docker Tutorial for Beginners
  • Kubernetes Tutorial for Beginners
© 2021 FOSS TechNix. All Rights Reserved. This website uses cookies to improve your experience. By using this website you agree with our Privacy Policy
Share via
Facebook
Twitter
LinkedIn
Mix
Email
Print
Copy Link
Powered by Social Snap
Copy link
CopyCopied
Powered by Social Snap