Day 37 Task: Kubernetes Important interview Questions.
Kalim Sayyad
DevOps Enthusiast | AWS | Docker | Ansible | Git | Jenkins | Kubernetes | IT Graduate 23'
1.What is Kubernetes and why it is important?
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. Its importance lies in simplifying complex tasks, enhancing scalability, and ensuring high availability.
2.What is difference between docker swarm and kubernetes?
While both Kubernetes and Docker Swarm manage containers, Kubernetes offers more advanced features and a larger ecosystem. Kubernetes is suited for complex deployments, whereas Docker Swarm is simpler and apt for smaller projects.
3.How does Kubernetes handle network communication between containers?
Kubernetes assigns unique IP addresses to each pod, enabling direct communication between containers within the same pod. For communication across pods, Kubernetes utilizes network plugins and services.
4.How does Kubernetes handle scaling of applications?
Kubernetes achieves application scaling through horizontal scaling, adjusting the number of replicas based on metrics like CPU utilization. This ensures optimal resource usage and load distribution.
5.What is a Kubernetes Deployment and how does it differ from a ReplicaSet?
A Kubernetes Deployment manages ReplicaSets, allowing declarative updates and rollbacks. A ReplicaSet, on the other hand, ensures a specified number of pod replicas are maintained.
6.Can you explain the concept of rolling updates in Kubernetes?
Rolling updates involve gradually replacing old instances with new ones during application updates. This approach ensures minimal disruptions and continuous availability.
7.How does Kubernetes handle network security and access control?
Kubernetes employs network policies for controlling pod-to-pod communication. Role-Based Access Control (RBAC) is used for authorization, defining access based on roles and permissions.
8.Can you give an example of how Kubernetes can be used to deploy a highly available application?
Imagine deploying a web application with multiple replicas spread across nodes. In the event of node failure, the application remains accessible due to replicas on other nodes.
9.What is namespace is kubernetes? Which namespace any pod takes if we don't specify any namespace?
A namespace is a virtual cluster within Kubernetes, used to partition resources. If no namespace is specified, pods are created in the "default" namespace.
领英推荐
10.How ingress helps in kubernetes?
Kubernetes Ingress manages external access to cluster services, enabling routing rules and traffic flow management.
11.Explain different types of services in kubernetes?
Kubernetes offers ClusterIP, NodePort, and LoadBalancer service types. ClusterIP provides internal access, NodePort facilitates external access, and LoadBalancer provisions external load balancers.
12.Can you explain the concept of self-healing in Kubernetes and give examples of how it works?
Kubernetes ensures self-healing by constantly monitoring pod health. If a pod fails, Kubernetes automatically restarts or replaces it, ensuring the desired replica count.
13.How does Kubernetes handle storage management for containers?
Kubernetes employs Persistent Volumes (PVs) and Persistent Volume Claims (PVCs) to manage container storage. PVCs claim resources defined by PVs.
14.How does the NodePort service work?
NodePort maps a port on each node to a service port, enabling external access via the node's IP address.
15.What is a multinode cluster and single-node cluster in Kubernetes?
A multinode cluster comprises multiple worker nodes, enhancing scalability and redundancy. A single-node cluster, suitable for development, runs on a single machine.
16.Difference between create and apply in kubernetes?
"Create" initiates the creation of a resource, while "apply" creates or updates based on provided configuration. "Apply" is idempotent, making it suitable for incremental changes.
#KubernetesMastery #InterviewPrep #DevOpsExploration