1. What is Kubernetes?
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications.
2. How does Kubernetes handle container orchestration?
Kubernetes uses a declarative configuration to define how containers should run, and it manages the deployment, scaling, and operation of application containers based on these configurations.
3. What are the key components of a Kubernetes cluster?
A Kubernetes cluster consists of a control plane (master) and nodes (workers). The control plane includes components like API server, etcd, controller manager, and scheduler, while nodes run containers.
4. What is a Pod in Kubernetes?
A Pod is the smallest deployable unit in Kubernetes, representing one or more containers that share the same network namespace and storage. Pods are the basic building blocks of applications.
5. How does Kubernetes ensure high availability and fault tolerance?
Kubernetes ensures high availability by distributing containers across multiple nodes and providing redundancy for critical components. etcd, the cluster’s key-value store, plays a crucial role in maintaining state.
6. What is a Kubernetes Namespace?
A Namespace in Kubernetes is a virtual cluster within a cluster, allowing the partitioning of resources and isolation of objects like Pods, Services, and ConfigMaps.
7. How does Kubernetes handle container scaling?
Kubernetes provides horizontal scaling by adjusting the number of replicas for a particular Pod or deployment, ensuring that applications can handle varying levels of load.
8. What is the role of a Kubernetes Deployment?
A Deployment in Kubernetes is a resource object that manages the deployment and scaling of a set of Pods, ensuring the desired number of replicas are running.
9. Can Kubernetes run stateful applications?
Yes, Kubernetes supports stateful applications through features like StatefulSets, which provide stable network identities and persistent storage for Pods.
10. How does Kubernetes handle service discovery and load balancing?
Kubernetes uses Services to provide a stable endpoint for accessing a group of Pods. It automatically load-balances traffic across the available Pods behind the Service.
11. What is a Kubernetes ConfigMap?
A ConfigMap is a Kubernetes resource used to store configuration data as key-value pairs, allowing decoupling of configuration from application code.
12. How does Kubernetes handle container networking?
Kubernetes uses a flat, shared network model where each Pod gets its IP address. Containers within a Pod share the same network namespace and can communicate using localhost.
13. What is the role of Kubernetes Ingress?
Kubernetes Ingress is an API object that manages external access to services within a cluster, providing HTTP and HTTPS routing, load balancing, and SSL termination.
14. What is a Kubernetes Secret?
A Secret in Kubernetes is a resource object used to store sensitive information, such as API keys or passwords, securely within the cluster.
15. How does Kubernetes handle rolling updates and rollbacks?
Kubernetes supports rolling updates by gradually replacing old Pods with new ones. Rollbacks are handled by reverting to a previous stable version of the application.
16. Can Kubernetes run on-premises and in multi-cloud environments?
Yes, Kubernetes is designed to be platform-agnostic and can run on-premises or across multiple cloud providers, providing a consistent orchestration platform.
17. What is the role of a Kubernetes DaemonSet?
A DaemonSet ensures that all or some nodes run a copy of a Pod, typically used for cluster-level daemons like log collectors or monitoring agents.
18. How does Kubernetes handle storage orchestration?
Kubernetes supports storage orchestration through Persistent Volumes (PVs) and Persistent Volume Claims (PVCs), allowing containers to access and store data persistently.
19. What is the Kubernetes Operator pattern?
The Operator pattern is a way to package, deploy, and manage applications in Kubernetes using custom resources, extending the capabilities of the native Kubernetes API.
20. How does Kubernetes handle security?
Kubernetes provides security features such as Role-Based Access Control (RBAC), pod security policies, network policies, and container runtime security to ensure a secure environment.
21. What is the role of a Kubernetes Service Account?
A Service Account is used to control the permissions and access levels for Pods within a Kubernetes cluster. It allows fine-grained access control for applications.
22. How does Kubernetes handle upgrades of the control plane components?
Kubernetes control plane upgrades are typically handled by replacing individual control plane components with newer versions while ensuring high availability during the process.
23. Can Kubernetes run non-containerized workloads?
While Kubernetes is primarily designed for containerized workloads, it can run non-containerized workloads through the use of tools like Virtual Kubelet.
24. What is the Kubernetes CNI (Container Network Interface)?
The Kubernetes CNI is a plugin interface that enables network providers to integrate with Kubernetes, allowing customization and flexibility in choosing network solutions.
25. How does Kubernetes handle resource constraints and quotas?
Kubernetes allows the setting of resource constraints and quotas, ensuring that Pods and containers do not consume excessive resources and maintaining fair resource distribution.
26. What is the role of Kubernetes Helm?
Helm is a package manager for Kubernetes that simplifies the deployment and management of applications by defining, installing, and upgrading Kubernetes applications.
27. Can Kubernetes run Windows containers?
Yes, Kubernetes supports running Windows containers alongside Linux containers, providing a mixed-OS environment within the same cluster.
28. What is Kubernetes Admission Control?
Kubernetes Admission Control is a set of plugins that intercept and modify admission requests to the API server, allowing customization of policies and security checks.
29. How does Kubernetes handle node auto-scaling?
Kubernetes can be integrated with cloud provider auto-scaling groups or similar mechanisms to automatically adjust the number of worker nodes based on demand.
30. What is a Kubernetes StatefulSet?
A StatefulSet in Kubernetes is a workload API object used to manage stateful applications, providing guarantees about the ordering and uniqueness of Pods.
31. How does Kubernetes handle rolling back a failed deployment?
Kubernetes supports automatic rollbacks in case of a failed deployment, allowing the system to revert to the previous stable state.
32. What is the role of a Kubernetes Job?
A Job in Kubernetes is a resource object used to create and manage a finite workload of Pods, ensuring that a specified number of them successfully terminate.
33. How does Kubernetes handle secrets rotation?
Kubernetes does not automatically handle secrets rotation. Users need to update Secrets manually or use external tools to manage the rotation process.
34. Can Kubernetes be used for multi-cloud deployments?
Yes, Kubernetes can be used for multi-cloud deployments by providing a consistent orchestration layer across different cloud providers.
35. How does Kubernetes handle rolling restarts?
Kubernetes handles rolling restarts by gradually stopping and replacing Pods in a controlled manner to ensure minimal disruption to the application.
36. What is the role of Kubernetes Horizontal Pod Autoscaler?
The Horizontal Pod Autoscaler automatically adjusts the number of replicas in a deployment or replica set based on observed CPU utilization or custom metrics.
37. Can Kubernetes be used for edge computing scenarios?
Yes, Kubernetes can be used for edge computing by extending clusters to edge locations, bringing container orchestration capabilities closer to the data source.
38. What is the Kubernetes API server and its role in the cluster?
The Kubernetes API server is the central management point that exposes the Kubernetes API, processes requests, and communicates with other control plane components.
39. How does Kubernetes handle rolling updates of configuration files?
Kubernetes rolling updates of configuration files are typically achieved by updating ConfigMaps or Secrets, triggering a rolling update of associated Pods.
40. What is the role of a Kubernetes ReplicationController?
ReplicationControllers, while being replaced by Deployments, were used to ensure a specified number of replicas of a Pod are running at all times.
41. Can Kubernetes be used for machine learning and AI workloads?
Yes, Kubernetes can be used for machine learning and AI workloads by leveraging features like custom resource definitions (CRDs) and operators to manage specialized workloads.
42. How does Kubernetes handle node failures?
Kubernetes handles node failures by rescheduling affected Pods onto healthy nodes, ensuring that the desired state of the application is maintained.
43. What is the Kubernetes Control Plane’s role in cluster management?
The Kubernetes Control Plane manages the overall state of the cluster, making global decisions about the cluster (for example, scheduling), as well as detecting and responding to cluster events (for example, starting up a new pod when a deployment’s replicas field is unsatisfied).
44. How does Kubernetes handle security patches for container runtimes?
Kubernetes relies on the container runtime for security patches. It is essential to keep the container runtime up-to-date with the latest security patches for vulnerabilities.
45. What is a Kubernetes Custom Resource Definition (CRD)?
A Custom Resource Definition allows users to define custom resources in a Kubernetes cluster and extend the Kubernetes API to include their own API objects.
46. How does Kubernetes handle rolling updates for StatefulSets?
Kubernetes ensures orderly rolling updates for StatefulSets by updating one Pod at a time based on the pod’s index, maintaining the identity of each Pod.
47. Can Kubernetes be used for serverless computing?
Kubernetes can be extended to support serverless computing through frameworks like Knative or by using custom configurations to scale deployments to zero.
48. How does Kubernetes handle application configuration management?
Kubernetes handles application configuration management through ConfigMaps and Secrets, allowing decoupling of configuration from application code and supporting dynamic updates.
49. What is the role of the Kubernetes Scheduler?
The Kubernetes Scheduler is responsible for placing Pods onto available nodes in the cluster, taking into consideration factors such as resource requirements and affinity rules.
50. How does Kubernetes handle rolling updates for DaemonSets?
Rolling updates for DaemonSets in Kubernetes are achieved by updating one node at a time, ensuring the availability of the daemon across the cluster during the update.