Kubernetes MCQs – Kubernetes CI/CD Integration

11.) Which Kubernetes object defines a Tekton pipeline?

A) Pod
B) PipelineRun
C) Pipeline
D) Job

Answer: Option C

Explanation: A Tekton Pipeline object defines the sequence of tasks to be executed.

12.) Which CI/CD method syncs changes automatically from Git to Kubernetes?

A) Manual sync
B) GitPush CI
C) GitOps
D) CLI Deployment

Answer: Option C

Explanation: GitOps automatically applies changes from Git to the cluster via tools like Argo CD or Flux.

13.) What command is used to create a deployment from a YAML file?

A) kubectl apply -f deployment.yaml
B) kubectl run -f deployment.yaml
C) kubectl build -f deployment.yaml
D) kubectl deploy deployment.yaml

Answer: Option A

Explanation: This command applies Kubernetes configuration to the cluster.

14.) What is the purpose of kubectl rollout status deployment in CI/CD?

A) Starts a deployment
B) Rolls back to a previous state
C) Checks rollout status of a deployment
D) Deploys a new image

Answer: Option C

Explanation: It helps ensure the deployment is successful before proceeding to the next step in the pipeline.

15.) Which CI/CD tool runs “runners” inside Kubernetes pods?

A) GitLab CI
B) Travis CI
C) CircleCI
D) Jenkins

Answer: Option A

Explanation: GitLab runners can be configured to run inside Kubernetes pods for scalability.

16.) Which command deletes a Kubernetes resource defined in a YAML file?

A) kubectl delete -f file.yaml
B) kubectl remove file.yaml
C) kubectl destroy file.yaml
D) kubectl stop -f file.yaml

Answer: Option A

Explanation: This command deletes the resource created from the specified YAML file.

17.) Which file typically defines CI/CD steps in GitLab CI?

A) Dockerfile
B) Jenkinsfile
C) .gitlab-ci.yml
D) pipeline.yaml

Answer: Option C

Explanation: GitLab CI uses .gitlab-ci.yml to define stages and jobs.

18.) Which of these supports declarative deployment models for Kubernetes?

A) Jenkins
B) Prometheus
C) Docker
D) Argo CD

Answer: Option D

Explanation: Argo CD reads manifests from Git and applies them declaratively.

19.) In CI/CD, why is kubectl set image used?

A) Set cluster-level permissions
B) Create a new secret
C) Update the image in a deployment
D) Configure persistent volumes

Answer: Option C

Explanation: This command updates the container image in a live deployment.

20.) What tool allows visual representation of CI/CD pipelines in Kubernetes?

A) Helm
B) Grafana
C) Tekton Dashboard
D) Prometheus

Answer: Option C

Explanation: Tekton Dashboard provides a web UI for pipelines and logs.

Leave a Reply

Your email address will not be published. Required fields are marked *