NCP-AIO practice question 4 of 15
A system administrator needs to scale a Kubernetes Job to 4 replicas. What command should be used?
Full set: 66 questionsThe kubectl scale command is the standard method for manually adjusting the number of running pods for a scalable Kubernetes resource. When applied to a Job resource, this command modifies the .spec.parallelism field, which dictates how many pods can run concurrently. The syntax kubectl scale job --replicas=4 sets the desired parallelism to 4. Although the question omits the specific job name, option C correctly identifies the command, resource type, and flag required to achieve the administrator's goal.
A. kubectl stretch job --replicas=4 stretch is not a valid kubectl command. The correct command for changing the number of replicas is scale.
B. kubectl autoscale deployment job --min=1 --max=10 This command configures a HorizontalPodAutoscaler (HPA) for a Deployment, not a Job. It is used for automatic scaling, not manual scaling to a fixed number.
D. kubectl scale job -r 4 The shorthand flag -r is not a valid alias for --replicas in the kubectl scale command. The full flag name must be used.
1. Kubernetes Official Documentation, kubectl scale command: This document provides the official syntax and examples for the scale command. It lists job as a valid resource type that can be scaled and specifies the --replicas flag.
Reference: Kubernetes Documentation > Reference > Kubectl > kubectl scale. (kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#scale)
2. Kubernetes Official Documentation, Jobs: This page explains the concept of a Kubernetes Job, including the .spec.parallelism field, which is what kubectl scale modifies for this resource type.
Reference: Kubernetes Documentation > Concepts > Workloads > Workload Resources > Job > "Parallel Jobs". (kubernetes.io/docs/concepts/workloads/controllers/job/#parallel-jobs)
Keep practicing
Take the free NCP-AIO practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other NCP-AIO practice questions
- Question 1You are managing a Kubernetes cluster running AI training jobs using TensorFlow. The jobs…
- Question 2If a Magnum IO-enabled application experiences delays during the ETL phase, what troubles…
- Question 3You are an administrator managing a large-scale Kubernetes-based GPU cluster using Run:AI…
- Question 5A system administrator needs to collect the information below: GPU behavior monitoring GP…
- Question 6A cloud engineer is looking to deploy a digital fingerprinting pipeline using NVIDIA Morp…
- Question 7A cloud engineer is looking to provision a virtual machine for machine learning using the…
