Kubernetes-1
Kubernetes-1
Answer: Taints are used to mark nodes in a Kubernetes cluster to prevent pods
from being scheduled unless they have a matching toleration. This mechanism
is used for advanced scheduling and resource management.
What is the role of Kubernetes Scheduler?
Answer: The Kubernetes Scheduler is responsible for placing pods onto nodes
in the cluster based on available resources, quality of service requirements,
and other constraints (e.g., affinity, taints). It ensures that pods are scheduled
efficiently for optimal resource utilization.
42. What is the difference between NodePort, ClusterIP, and LoadBalancer in
Kubernetes?
Answer:
NodePort exposes the service on each node’s IP at a static port.
ClusterIP exposes the service on a cluster-internal IP (default type).
LoadBalancer exposes the service externally using a cloud provider's
load balancer.
43. What is a Kubernetes Volume?
Answer: A Volume in Kubernetes provides persistent storage that can be
accessed by containers within a pod. Volumes allow data to persist across pod
restarts. There are various types of volumes, such as emptyDir, hostPath, and
NFS.
44. What is the difference between a ReplicaSet and a Deployment in
Kubernetes?
Answer: A ReplicaSet ensures that a specified number of pod replicas are
running at any given time. A Deployment manages the lifecycle of ReplicaSets
and provides additional features like rolling updates and rollback.
45. How does Kubernetes handle service discovery?
Answer: Kubernetes provides service discovery through its DNS system,
allowing applications to discover and communicate with services using their
names. The DNS system automatically creates A records for services in the
cluster.
46. What are Kubernetes Affinity and Anti-Affinity rules?
Mayank Singh
Answer:
Affinity refers to rules that determine which nodes or other pods a pod
should be scheduled on, based on the node’s labels.
Anti-Affinity prevents a pod from being scheduled on nodes or alongside
other specific pods, helping avoid resource contention.
47. What is the Kubernetes API server?
Answer: The API server is the component of the Kubernetes control plane that
exposes the Kubernetes API. It serves as the gateway for all interactions with
the Kubernetes cluster, handling REST operations and providing API endpoints
for cluster components.
48. What is a Kubernetes admission controller?
Answer: Admission Controllers are plugins that govern and enforce how the
cluster is used. They can modify or reject requests to create or update
resources based on policies or constraints. Common examples include
LimitRanger and NamespaceLifecycle.
49. What is a Kubernetes Helm Chart?
Answer: A Helm Chart is a package format for Helm, which contains all the
resource definitions needed to run an application, tool, or service on
Kubernetes. Helm charts help in defining, installing, and upgrading complex
Kubernetes applications.
50. What is Kubernetes RBAC and how does it work?
Answer: Role-Based Access Control (RBAC) in Kubernetes defines permissions
based on roles that can be assigned to users or service accounts. RBAC is used
to control access to Kubernetes resources at a granular level, specifying who
can do what on which resources.