Complete the command to scale a deployment named webapp to 3 replicas.
kubectl scale deployment webapp --replicas=[1]The --replicas flag sets the number of desired pods. Here, 3 replicas means 3 pods will run.
Complete the command to check the current number of replicas for deployment api-server.
kubectl get deployment api-server -o [1]wide shows more info but not just replicas.yaml or json shows full details.The jsonpath output format lets you extract specific fields. Here, it shows the number of replicas.
Fix the error in this command to scale deployment frontend to 4 replicas.
kubectl scale deployment frontend --replicas [1]The correct syntax uses --replicas=4 or --replicas 4. Here, the space without '=' is valid, so just '4' is correct.
Fill both blanks to create a YAML snippet that sets replicas to 5 for a deployment.
apiVersion: apps/v1 kind: Deployment metadata: name: myapp spec: replicas: [1] selector: matchLabels: app: [2]
The replicas field sets how many pods run. The app label must match the deployment name or selector.
Fill all three blanks to create a command that scales deployment backend to 6 replicas and outputs the updated replicas count.
kubectl scale deployment [1] --replicas=[2] && kubectl get deployment [3] -o jsonpath='{.status.replicas}'
The deployment name must be consistent in both commands. The replicas number is 6 as requested.