Kcna Kubernetes And Cloud Native Associate · Free Practice Question Medium

Question 28

You are managing a Kubernetes cluster for a company's microservices-based application. One of the development teams is deploying a new pod in the default namespace, but they haven't specified any resource requirements in the pod's definition file. What will be the result regarding resource limits for this pod?

  • A

    Kubernetes will reject the pod deployment, requiring the team to specify resource requirements

  • B

    a pod in Kubernetes will run with no limits on CPU and memory in a default namespace

  • C

    Kubernetes assigns default resource limits of 0.5 CPU and 256 MiB memory to the pod

  • D

    the pod will inherit the resource limits of the node it is scheduled on

Reveal correct answer

Correct answer: B

Explanation

In a Kubernetes default namespace, if a pod is deployed without specifying resource limits for CPU and memory, it will run with no explicit constraints on these resources. This means the pod can potentially consume as much CPU and memory as it needs, subject to the availability of resources on the node where it is scheduled. However, this lack of resource constraints can lead to resource contention and negatively impact the performance and stability of other pods and system components on the same node. It's generally recommended to set resource limits to ensure fair resource allocation and prevent pods from monopolizing node resources.

https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/

A. Kubernetes does not automatically reject pod deployments if resource requirements are not specified. While it is a best practice to define resource limits to ensure fair resource allocation and prevent resource contention, Kubernetes will still allow the pod to be deployed without explicit resource requirements.

B. In Kubernetes, if resource requirements are not specified in a pod's definition file, the pod will run with no limits on CPU and memory in the default namespace. This means the pod can consume as much CPU and memory as it needs, potentially impacting the performance of other pods on the same node.

C. Kubernetes does not assign default resource limits of 0.5 CPU and 256 MiB memory to a pod in the default namespace if resource requirements are not specified. Without explicit resource limits, the pod will run without any restrictions on CPU and memory usage, which can impact the overall performance of the cluster.

D. Pods do not inherit resource limits from the node they are scheduled on if resource requirements are not specified in the pod's definition file. Without explicit resource limits, the pod will run with no constraints on CPU and memory usage, potentially leading to resource exhaustion and performance issues.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need