Day 37: Kubernetes important Interview Questions

Day 37: Kubernetes important Interview Questions

Table of contents

No heading

No headings in the article.

  1. What is Kubernetes and why it is important?

    Kubernetes is an open-source orchestration tool developed by Google for managing micro-services or containerized applications across distributed cluster nodes.

    Kubernetes provided highly resilient infrastructure with zero downtime deployment capabilities, automatic rollback, scaling and self-healing (auto healing) of containers.

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

    Docker Swarm is a lightweight, easy-to-use orchestration tool with limited offerings compared to Kubernetes.

    In contrast, Kubernetes is complex but powerful and provides self-healing, and auto-scaling capabilities out of the box.

  3. How does Kubernetes handle network communication between containers?

    From a network standpoint, each container within the pod shares the same networking namespace. This gives each container access to the same network resources, such as the pod's IP address. Containers within the same pod can also communicate with each other over localhost.

  4. How does Kubernetes handle the scaling of applications?

    In Kubernetes, a HorizontalPodAutoscaler automatically updates a workload resource (such as a Deployment or StatefulSet), to automatically scale the workload to match demand. Horizontal scaling means that the response to increased load is to deploy more Pods.

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

    A deployment is a higher-level object that provides advanced features such as rolling updates, rollbacks, and self-healing capabilities.

    while a replica set is a lower-level object that is responsible for ensuring that a specified number of replicas are always running.

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

    This feature gradually brings down the old Replication-Controller(RC) and brings up the new one. This results in slow deployment, however, there is no deployment. At all times, a few old pods and a few new pods are available in this process.

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

    Kubernetes ships an integrated Role-Based Access Control (RBAC) component that matches an incoming user or group to a set of permissions bundled into roles.

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

    To enhance high availability, consider deploying your Kubernetes cluster across multiple availability zones or regions. This provides redundancy at the cluster level, allowing your application to withstand failures or disruptions in a specific zone.

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

    A Kubernetes namespace provides the scope for Pods, Services, and Deployments in the cluster.

    The default namespace will be taken by any pod if we don't specify any namespace.

  10. How does ingress help in Kubernetes?

    An ingress is an object that allows access to your kubernetes services from outside the kubernetes cluster. You configure access by creating a collection of rules that define which inbound connection reach which service.

  11. Explain different types of services in Kubernetes.

    Cluster IP




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

    Self-healing is a feature provided by the Kubernetes open-source system. If a containerized app or an application component fails or goes down, Kubernetes re-deploys it to retain the desired state. Kubernetes provides self-healing by default.

  13. How does the NodePort service work?

    NodePort makes a service accessible from outside the cluster.

    Exposes the service on the same port of each selected node in the cluster using NAT.

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

    Multiple API servers exist in the case of multi-cluster. Inter-cluster communication is another area that needs to be handled in the case of multi-cluster Kubernetes.

  15. Difference between creating and apply in Kubernetes?

    The key difference between kubectl apply and create is that apply creates Kubernetes objects through a declarative syntax, while the create command is imperative. The command set kubectl apply is used at a terminal's command-line window to create or modify Kubernetes resources defined in a manifest file.