QuestionQ54

703.2 Basic Kubernetes Operations

Given this Kubernetes Deployment:

Question Image

Which command scales the application to five containers?

  • A kubectl edit deployment/myapp replicas=5
  • B kubectl deployment myapp replicas=5
  • C kubectl scale deployment/myapp --replicas
  • D kubectl replicate deployment/myapp +3
  • E kubectl clone deployment/myapp 3
Explanation

The kubectl command-line tool provides a dedicated 'scale' subcommand for changing the desired replica count of a resource such as a Deployment, invoked as 'kubectl scale deployment/<name> --replicas=<N>'; none of the other listed forms (edit with inline key=value, a bare 'deployment' verb, 'replicate', or 'clone') are valid kubectl commands.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!