Day 37 Task: Kubernetes Important interview Questions.

Day 37 Task: Kubernetes Important interview Questions.

#90daysofdevopschallenge

Β·

4 min read

1.What is Kubernetes and why it is important?

Kubernetes is a container management tool that we call it as an orchestration tool. It manages the multiple containers in our environment. Kubernetes has many more options like scalability, high availability, self-healing, and also service discovery so it is very easy to manage containers.

2.What is the difference between docker swarm and Kubernetes?

Docker Swarm was developed by Docker and is known for its simplicity and ease of use, particularly for users already familiar with Docker. It Provides built-in service discovery and load balancing.

Kubernetes was Originally developed by Google, now maintained by the Cloud Native Computing Foundation (CNCF). Kubernetes follows a more modular and extensible architecture.

3.How does Kubernetes handle network communication between containers?

Kubernetes manages network communication between containers through its networking model, which provides a flexible and extensible way for containers to communicate within a cluster.

4. How does Kubernetes handle the scaling of applications?

Kubernetes provides a robust set of features for scaling applications, both manually and automatically, to meet varying workloads and demands. In Kubernetes, we have replicas set, pod autoscaling, and manual scaling options to scale the applications

5.What is a Kubernetes Deployment and how does it differ from a ReplicaSet ?

In Kubernetes, a Deployment and a ReplicaSet are both abstractions that help manage and scale the deployment of containerized applications.

Deployment manages all the updates related to applications. Automated rolling updates with built-in management and rollback capabilities.

The replicas set ensures that a specified number of replicas (identical copies) of Pods are running at any given time. Its primary purpose is to maintain the desired number of Pods for high availability and fault tolerance.

6.Can you explain the concept of rolling updates in Kubernetes?

Rolling updates in Kubernetes is a process of updating the deployed applications to the new version configuration. It means minimizing the downtime and ensuring that the applications remain available during updates

7.How does Kubernetes handle network security and access control?

Kubernetes provides several features to handle network security and access control within a cluster. These features like RBAC, and network policies to help secure communication between different components, control access to resources, and enforce policies.

8.Can you give an example of how Kubernetes can be used to deploy a highly available application?

If we want to make the application highly available we need to configure horizontal pod-autoscaling to automatically adjust the number of replicas so our application is highly available.

9.What is namespace is kubernetes? Which namespace any pod takes if we don't specify any namespace?

Namespace in Kubernetes is a kind of group of different resources we configure different resources under one namespace and different resources and namespaces.

If we don't specify it takes the default namespace.

10.How ingress helps in Kubernetes?

In Kubernetes, Ingress is a resource that manages external access to services within a cluster. It provides a way to route external HTTP and HTTPS traffic to different services based on the requested host and path

11.Explain different types of services in Kubernetes?

In Kubernetes, there are three types of services ClusterIP, NodePort, and LoadBalancer.

ClusterIP Exposes the Service on a cluster-internal IP address.

NodePort Exposes the Service on each Node's IP address at a static port (NodePort). It opens a specific port on every Node, and traffic is forwarded to the Service.

LoadBalancer Exposes the Service externally using a cloud provider's load balancer. The cloud provider provisions a load balancer that directs traffic to the Service.

12.Can you explain the concept of self-healing in Kubernetes and give examples of how it works?

In Kubernetes, the concept of self-healing refers to the system's ability to automatically detect and recover from failures without manual intervention

for example - if any pod is deleted or crashed the Kubernetes self-healing automatically creates a new pod and runs.

13.How does Kubernetes handle storage management for containers?

In Kubernetes storage management for containers is persistent volume and persistent volume claim. these components provide a way to decouple storage provisioning and management from the application, allowing for dynamic and flexible storage solutions.

14.How does the NodePort service work?

In Kubernetes, a NodePort Service is a type of service that exposes a service on a specific port on each node in the cluster. It allows external access to services running within the cluster by mapping a specific port on each node to a port on the Service.

15.What is a multinode cluster and single-node cluster in Kubernetes?

In Kubernetes, a multinode cluster means the cluster consists of multiple nodes and a single node cluster that consists of a single machine running all the necessary components of Kubernetes.

16.Difference between create and apply in Kubernetes?

In kubernetes kubectl create and apply are used to create the resources but in kuberctl create if the resource is already created it will show an error and in kubectl apply it updates the resources.

Β