Frequently asked questions and answers of Containerization (Docker, Kubernetes) in Cloud Computing of Computer Science to enhance your skills, knowledge on the selected topic. We have compiled the best Containerization (Docker, Kubernetes) Interview question and answer, trivia quiz, mcq questions, viva question, quizzes to prepare. Download Containerization (Docker, Kubernetes) FAQs in PDF form online for academic course, jobs preparations and for certification exams .
Intervew Quizz is an online portal with frequently asked interview, viva and trivia questions and answers on various subjects, topics of kids, school, engineering students, medical aspirants, business management academics and software professionals.
Question-1. What is containerization?
Answer-1: Containerization is a lightweight virtualization method that packages an application and its dependencies into a container, ensuring it runs consistently across different environments.
Question-2. What is Docker?
Answer-2: Docker is an open-source platform that automates the deployment, scaling, and management of containerized applications.
Question-3. How do containers differ from virtual machines?
Answer-3: Containers share the host OS kernel and isolate applications, making them more lightweight and faster to start than virtual machines which include a full OS.
Question-4. What is a Docker image?
Answer-4: A Docker image is a read-only template with instructions for creating a Docker container.
Question-5. What is a Docker container?
Answer-5: A Docker container is a runtime instance of a Docker image, including the application and its dependencies.
Question-6. How do you create a Docker container?
Answer-6: By running the command `docker run` with a specified Docker image.
Question-7. What is Dockerfile?
Answer-7: A Dockerfile is a text file that contains instructions to build a Docker image.
Question-8. What is the role of Docker Hub?
Answer-8: Docker Hub is a cloud-based repository where Docker images can be stored and shared.
Question-9. How can you persist data in Docker containers?
Answer-9: By using Docker volumes or bind mounts to store data outside the container filesystem.
Question-10. What is Kubernetes?
Answer-10: Kubernetes is an open-source container orchestration platform for automating deployment, scaling, and management of containerized applications.
Question-11. What is a pod in Kubernetes?
Answer-11: A pod is the smallest deployable unit in Kubernetes, which can contain one or more containers sharing storage, network, and specification.
Question-12. How does Kubernetes differ from Docker?
Answer-12: Docker focuses on containerization, while Kubernetes orchestrates and manages multiple containers across clusters.
Question-13. What are the main components of Kubernetes architecture?
Answer-13: Main components include the Master Node (API Server, Scheduler, Controller Manager), Worker Nodes, kubelet, and etcd.
Question-14. What is a Kubernetes cluster?
Answer-14: A Kubernetes cluster is a set of nodes that run containerized applications managed by Kubernetes.
Question-15. What is the purpose of the Kubernetes API server?
Answer-15: It acts as the front end for the Kubernetes control plane, handling REST requests and updates.
Question-16. What is a Deployment in Kubernetes?
Answer-16: A Deployment manages stateless applications, ensuring the desired number of pod replicas are running.
Question-17. What is a StatefulSet?
Answer-17: A StatefulSet manages stateful applications, providing stable network IDs and persistent storage.
Question-18. What is a Service in Kubernetes?
Answer-18: A Service defines a logical set of pods and a policy to access them, often via load balancing.
Question-19. What is the difference between a ReplicaSet and a Deployment?
Answer-19: ReplicaSet ensures a specified number of pod replicas, while Deployment provides declarative updates and rollback capabilities.
Question-20. How do you scale applications in Kubernetes?
Answer-20: By adjusting the number of replicas in a Deployment using commands like `kubectl scale` or autoscaling.
Question-21. What is a Namespace in Kubernetes?
Answer-21: Namespaces provide a way to divide cluster resources between multiple users or teams.
Question-22. What is Helm?
Answer-22: Helm is a package manager for Kubernetes that simplifies deployment and management of applications.
Question-23. What is a container registry?
Answer-23: A container registry is a storage and distribution system for container images, such as Docker Hub or Google Container Registry.
Question-24. How does Docker networking work?
Answer-24: Docker networking allows containers to communicate via network drivers like bridge, host, or overlay networks.
Question-25. What is a Docker volume?
Answer-25: Docker volumes provide persistent storage that is independent of the container lifecycle.
Question-26. How do Kubernetes handle container failures?
Answer-26: Kubernetes automatically restarts failed containers and reschedules pods on healthy nodes.
Question-27. What is the role of kubelet in Kubernetes?
Answer-27: kubelet runs on each worker node and manages pod lifecycle according to the Kubernetes API.
Question-28. What is an Ingress in Kubernetes?
Answer-28: Ingress manages external access to services in a cluster, typically HTTP, providing load balancing and SSL termination.
Question-29. What is the difference between Docker Compose and Kubernetes?
Answer-29: Docker Compose is used for defining and running multi-container Docker applications on a single host, Kubernetes manages containerized applications at scale across clusters.
Question-30. What is a sidecar container?
Answer-30: A sidecar container runs alongside the main container in a pod to extend functionality, such as logging or monitoring.
Question-31. How do you update a running Kubernetes application?
Answer-31: Using `kubectl apply` to update Deployment manifests, which triggers rolling updates.
Question-32. What is the role of etcd in Kubernetes?
Answer-32: etcd is a distributed key-value store used to store cluster state and configuration data.
Question-33. What is container orchestration?
Answer-33: Container orchestration automates deployment, management, scaling, and networking of containers.
Question-34. What is the difference between Docker Swarm and Kubernetes?
Answer-34: Docker Swarm is Docker?s native clustering tool with simpler setup, Kubernetes is more feature-rich and widely adopted for production environments.
Question-35. How does Kubernetes ensure high availability?
Answer-35: By replicating pods, automatic rescheduling on healthy nodes, and multi-master configurations.
Question-36. What is a DaemonSet in Kubernetes?
Answer-36: A DaemonSet ensures that a copy of a pod runs on all or selected nodes.
Question-37. How do you monitor containers in production?
Answer-37: Using tools like Prometheus, Grafana, ELK stack, or Kubernetes-native monitoring solutions.
Question-38. What is the use of labels and selectors in Kubernetes?
Answer-38: Labels are key-value pairs attached to objects, and selectors are queries to filter objects based on labels.
Question-39. How do you manage secrets in Kubernetes?
Answer-39: Kubernetes Secrets store sensitive information like passwords and tokens securely.
Question-40. What is a Kubernetes ConfigMap?
Answer-40: ConfigMap stores non-confidential configuration data in key-value pairs for pods.
Question-41. How do you expose a Kubernetes service externally?
Answer-41: Using NodePort, LoadBalancer, or Ingress resources.
Question-42. What is the difference between rolling update and recreate strategy in Kubernetes?
Answer-42: Rolling update updates pods gradually without downtime; recreate stops old pods before starting new ones.
Question-43. What is container image layering?
Answer-43: Container images are built in layers, each representing a filesystem change, enabling reuse and efficient storage.
Question-44. How do Docker and Kubernetes handle security?
Answer-44: By implementing container isolation, role-based access control (RBAC), network policies, and secrets management.
Question-45. What is the purpose of the Docker daemon?
Answer-45: The Docker daemon runs in the background to build, run, and manage containers.
Question-46. How do you handle persistent storage in Kubernetes?
Answer-46: Using Persistent Volumes (PV) and Persistent Volume Claims (PVC) to manage storage independent of pod lifecycle.
Question-47. What is a Kubernetes Operator?
Answer-47: An Operator extends Kubernetes functionality to manage custom resources and automate application lifecycle management.
Question-48. What is the significance of namespaces in Kubernetes?
Answer-48: Namespaces isolate resources and access for multi-tenant clusters.
Question-49. How do you troubleshoot failing pods in Kubernetes?
Answer-49: Using `kubectl logs`, `kubectl describe pod`, and events inspection to identify issues.
Question-50. What is container immutability?
Answer-50: Containers are immutable once built, meaning changes require building and deploying a new image to ensure consistency.
Frequently Asked Question and Answer on Containerization (Docker, Kubernetes)
Containerization (Docker, Kubernetes) Interview Questions and Answers in PDF form Online
Containerization (Docker, Kubernetes) Questions with Answers
Containerization (Docker, Kubernetes) Trivia MCQ Quiz