Top 20 Kubernetes Interview Questions with Answers
1. What is Kubernetes? What it does?
Answer: Kubernetes is a container management system developed in the Google and later open sourced. The purpose of Kubernetes is to manage a containerized application in various types of physical, virtual, and cloud environments. Kubernetes can deploy your application in containerized format. It can automatically scale your application by creating new instances and then automatically destroy them when not need. It can also auto-start your application if it goes down. Applications are run inside pods which is managed by Kubernetes.
2. What are the features of Kubernetes?
Answer: The features of Kubernetes are:
- Automated Scheduling
- Self-Healing Capabilities
- Automated rollouts & rollback
- Horizontal Scaling & Load Balancing
- Offers environment consistency for development, testing, and production
- Infrastructure is loosely coupled to each component can act as a separate unit
- Provides a higher density of resource utilization
- Offers enterprise-ready features
- Application-centric management
- Auto-scalable infrastructure
- You can create predictable infrastructure
3. What are the disadvantages of Kubernetes?
Answer:
- Kubernetes dashboard is not as helpful as it should be
- Security is not very effective.
- It is very complex and can reduce productivity
- Kubernetes is more costly than its alternatives.
4. What are the tools that are used for container monitoring?
Answer: Tools used for container monitoring are:
- Heapster
- cAdvisor
- Prometheus
- InfluxDB
- Grafana
5. What are the components of Kubernetes?
Answer: The three components of Kubernetes are:
- Addons
- Node components
- Master Components
6. What is a node in Kubernetes?
Answer:
A node is the smallest unit of hardware. It defines a single machine in
a cluster that can be a virtual machine from a cloud provider or a
physical machine in the data center. Every machine available in the
Kubernetes cluster can substitute other machines.
7. What is Heapster in Kubernetes?
Answer: A Heapster is a metrics collection and performance monitoring system for data that are collected by the Kublet.
8. Why is namespace used in Kubernetes?
Answer:
Namespaces in Kubernetes are used for dividing cluster resources
between users. It helps the environment where more than one user spread
projects or teams and provides a scope of resources.
9. What is Kube-proxy?
Answer:
Kube-proxy is an implementation of both a network proxy and a load
balancer. It is used to support service abstraction used with other
networking operations. It is responsible for directing traffic to the
container depend on IP and the port number.
10. What are the tools that are used for container monitoring?
Answer: Tools that are used for container monitoring are:
- Heapster
- cAdvisor
- Prometheus
- InfluxDB
- Grafana
11. What are the uses of GKE?
Answer: The uses of the GKE (Google Kubernetes Engine) are:
- It can be used to create docker container clusters
- Resize application controllers
- Update and then upgrade the clusters of container
- Debug cluster of the container.
- GKE can be used to creates a replication controller, jobs, services, container pods, or load balancer.
12. What are some important Kubectl commands?
Answer: The important Kubectl commands are as follows:
- kubectl annotate
- kubectl cluster-info
- kubectl attach
- kubectl apply
- kubectl config
- kubectl autoscale
- kubectl config current-context
- kubectl config set.
13. What are the objectives of the replication controller?
Answer: The objectives of the replication controller are:
- It is responsible for controlling and administering the pod lifecycle.
- It monitors and verifies whether the allowed number of replicas are running or not.
- The replication controller helps the user to check the pod status.
- It enables to alter a pod. The user can drag its position the way interested in it.
14. What are the ways to provide API-Security on Kubernetes?
Answer: The ways to provide API-Security on Kubernetes are as follows:
- Using correct auth mode with API server authentication mode= Node.
- Make kubeless that protects its API via authorization-mode=Webhook.
- Ensure the kube-dashboard uses a restrictive RBAC (Role-Based Access Control) policy
15. What are the types of Kubernetes Volume?
Answer: The types of Kubernetes Volume are as follows:
- EmptyDir
- GCE persistent disk
- Flocker
- HostPath
- NFS
- ISCSI
- rbd
- PersistentVolumeClaim
- downwardAPI
16. What is PVC?
Answer:
PVC stands for Persistent Volume Claim. It is storage requested by
Kubernetes for pods. The user does not require to know the underlying
provisioning. This claim should be created in the same namespace where
the pod is created.
17. What are federated clusters?
Answer: Federated clusters refer to multiple clusters that are managed as a single cluster.
18. What are examples of some recommended security measures for Kubernetes?
Answer:
- Defining resource quotas
- Auditing support
- Providing restricted access to etcd
- Regular security updates
- Network segmentation
- Strict resource policies
- Regular scans for security vulnerabilities
- Using images from repositories that are authorized
19. What is the use of Kubelet?
Answer:
A Kubelet is the lowest level component present in Kubernetes. It is
used for supporting and maintaining what’s running on every individual
machine. It's like a process watcher focused on running a given set of
containers.
20. What is Minikube in Kubernetes?
Answer:
Minikube is an open-source tool that enables a user to run Kubernetes
on a laptop or other local machines. It can work with various Operating
Systems like Linux, Mac, and Windows. It works as a single-node cluster
inside a virtual machine on your local machine. It is used in Kubernetes
to evaluate important features and help scale the environment via
effective maintenance and control.
That's all about 20 common Kubernetes Interview questions with Answers. In a nutshell, the
above-mentioned questions with answers are what you need right now so
that you can pass your interview. The interview is not as hard as you
may think. It is just like any other and you can make it to the end if
you give it your best shot. Keep going through the questions with the
answers and you will see how easy they are. Wish you the best of luck.
- 20 Docker Interview Questions with Answers
- 20 advanced Kubernetes Interview Questions with answers
- 40+ Object-Oriented Programming Questions with Answers
- 20 Software Design and Pattern Questions from Interviews
- 50+ Microsoft SQL Server Phone Interview questions
- 15 Cyber Security Interview Questions with Answers
- 20 PostgreSQL Interview Questions with Answers
- 12 SQL Query Interview questions with solutions
- 25+ Spring Security Interview Questions with Answers
- 30 JavaScript Interview Questions with Answers
- 20 Algorithms Interview Questions for Software Developers
- 17 Spring AOP Interview Questions with Answers
- 130+ Java Interview Questions with Answers
- 20 System Design Interview Questions with Answers
- 20+ Spring Boot Interview Questions with Answers
- 20 JUnit Interview Questions with Answers
- 10 Oracle Interview Questions with Answers
- 50 SQL and Database Interview Questions for Beginners
- 25 Recursion Interview questions with answers
- 35 Python Interview Questions for 1 to 2 years experienced
No comments:
Post a Comment
Feel free to comment, ask questions if you have any doubt.