Users Online

· Guests Online: 40

· Members Online: 0

· Total Members: 285
· Newest Member: Zarfdrilhor

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

20 - Scheduling.html

20 - Scheduling.html
DevOps Courses » UD-Kubernetes-Mastery-240-Key-Interview-Questions-2024
Categories Most Recent Top Rated Popular Courses
Uploader Date Added Views Rating
Superadmin 31.05.17 261 No Rating
Description
What is the Role of the Scheduler in Kubernetes?

Answer: The Kubernetes Scheduler is responsible for assigning newly created or unscheduled pods to nodes in the cluster. It makes this decision based on several factors such as resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, and inter-workload interference.

How Does Kubernetes Scheduler Ensure Pod Placement According to Resource Requirements?

Answer: The Kubernetes Scheduler matches resource requirements like CPU and memory specified in the Pod spec against the available resources on nodes. It ensures that a Pod is scheduled on a node only if the node has sufficient available resources to meet the Pod's requirements.

What are Taints and Tolerations in Kubernetes, and How Do They Affect Scheduling?

Answer: Taints and tolerations work together to ensure that Pods are not scheduled onto inappropriate nodes. A taint is applied to a node and marks it to repel a set of Pods, unless those Pods tolerate the taint. Tolerations are applied to Pods and allow (but do not require) the Pods to schedule onto nodes with matching taints.

Explain Node Affinity and Anti-affinity in Kubernetes.

Answer: Node affinity and anti-affinity are rules used by the scheduler to place Pods on nodes based on labels on the nodes. Affinity rules attract Pods to nodes with specific labels, while anti-affinity rules repel Pods from nodes with specific labels. This is used to ensure that Pods are scheduled according to business, security, or compliance requirements.

How Can You Influence Pod Scheduling Decisions Apart from Using Taints, Tolerations, and Affinity?

Answer: Apart from taints, tolerations, and affinity, you can influence scheduling decisions using:

Node Selectors: Simple way to constrain Pods to nodes with specific labels.

Resource Limits and Requests: Defining resource requirements in Pod specifications.

Pod Priority and Preemption: Assigning priority to Pods and allowing higher priority Pods to preempt lower priority ones.

Custom Scheduler: Implementing a scheduler that fits specific needs or policies.

What Happens If a Pod Cannot Be Scheduled?

Answer: If a Pod cannot be scheduled (e.g., due to resource constraints, taints, or affinity rules), it remains in the Pending state. The scheduler continues to attempt to find a suitable node for the Pod until it can be successfully scheduled or the Pod is deleted.

How Does Kubernetes Handle Pod Scheduling Failure?

Answer: In case of scheduling failure, Kubernetes provides feedback about why the Pod couldn’t be scheduled. This can be obtained using the kubectl describe pod [pod-name] command, which shows events including any scheduling failures. Cluster administrators can use this information to diagnose and resolve scheduling issues.

What is DaemonSet and How is its Scheduling Unique?

Answer: A DaemonSet ensures that a copy of a Pod runs on all (or some) nodes in the cluster. When nodes are added to the cluster, Pods are automatically added to them. When nodes are removed, those Pods are garbage collected. DaemonSets are typically used for node monitoring, log collection, or running system-level daemons.

Can You Schedule Pods to Specific Nodes Based on Their Hardware (CPU/GPU) Specifications?

Answer: Yes, you can schedule Pods on nodes based on specific hardware requirements using node labels and Pod node selectors or affinities. Nodes can be labeled according to their hardware specifications, and Pods can be configured to be scheduled on nodes that match these labels.

What are Pod Disruption Budgets and How Do They Affect Scheduling?

Answer: A Pod Disruption Budget (PDCool is a policy that limits the number of Pods of an application that can be down simultaneously during voluntary disruptions (like upgrades). PDBs are considered by the Kubernetes scheduler to prevent evictions that would violate the budget, ensuring high availability during maintenance operations.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.
Render time: 2.21 seconds
32,192,923 unique visits