WebMagicInformatica
CKA practice exams

Kubernetes: CKA: mock tests

Find out if you're ready before you pay for the real exam. Start with a free 15-question readiness check, then practise with 2 full-length timed exams, every answer explained.

  • 2full exams
  • 80questions
  • 90 minper exam
  • 66%pass mark

Included in Premium

All 2 full exams, an AI tutor and a study plan

Plus every other certification mock test and the career tools.

Get Premium · ₹399 / 30 days

Free readiness check

15 questions across every domain, 20 minutes. See where you stand before you book.

Sign up free to take the check

Have an account? Log in

  • 2 full-length exams, 40 questions each
  • 90 minutes per exam, timed like the real thing
  • Every answer explained, with official documentation links
  • AI tutor on every question you get wrong
  • A study plan after every exam
  • Score by domain against the 66% pass mark

How it works

  1. 1Free readiness check15 questions from every domain in 20 minutes. Free with an account.
  2. 2Full timed exams2 × 40 questions in 90 minutes, included in Premium.
  3. 3Fix your weak spotsAn AI tutor explains each mistake and a study plan links the lessons to study.

What the exam covers

  • Storage10% of the exam
  • Workloads and Scheduling15% of the exam
  • Services and Networking20% of the exam
  • Cluster Architecture, Installation and Configuration25% of the exam
  • Troubleshooting30% of the exam

Every exam and the readiness check follow these weights.

Full exams

  • Practice Exam 1

    40 questions · 90 min

    Included in Premium
  • Practice Exam 2

    40 questions · 90 min

    Included in Premium

5 free CKA sample questions

The same style and difficulty as the full exams. Try each one, then check the answer.

Sample question 1Troubleshooting

A Pod is stuck in Init:0/1. The init container is named wait-for-db. Which command shows why?

  1. A.

    kubectl logs mypod

  2. B.

    kubectl top pod mypod

  3. C.

    kubectl port-forward mypod 8080

  4. D.

    kubectl logs mypod -c wait-for-db

Show answer and explanation

Answer: D

Init container output is read with -c <init-container-name>. Use kubectl describe pod mypod for events too.

  • Without -c, the main containers have not started, so no logs exist.
  • top shows resource usage only.
  • Port forwarding needs a running application container.
Sample question 2Cluster Architecture, Installation and Configuration

A cluster's kube-apiserver runs v1.37 (the Kubernetes version of the current exam). According to the version skew policy, which kubelet versions are supported?

  1. A.

    v1.36 through v1.38

  2. B.

    v1.34 through v1.37

  3. C.

    v1.35 through v1.37

  4. D.

    v1.34 through v1.38

Show answer and explanation

Answer: B

The kubelet must not be newer than the API server, and may be up to three minor versions older, so 1.34 to 1.37.

  • Any range that reaches v1.38 allows a kubelet newer than the API server, which is not supported.
  • v1.35 through v1.37 reflects the old two-version rule; since v1.28 the kubelet may lag by three minor versions.
Sample question 3Services and Networking

A StatefulSet named db with serviceName: db needs each Pod to have a stable DNS name such as db-0.db. Which kind of Service is required?

  1. A.

    A headless Service (clusterIP: None) named db that selects the Pods.

  2. B.

    A ClusterIP Service with a virtual IP.

  3. C.

    A NodePort Service on port 30000.

  4. D.

    An ExternalName Service.

Show answer and explanation

Answer: A

A headless Service has no virtual IP; DNS returns the individual Pod records, so each StatefulSet Pod gets pod-name.service-name.

  • A normal ClusterIP load-balances behind one name and does not provide per-Pod records.
  • NodePort is for external exposure.
  • ExternalName maps to an outside DNS name.
Sample question 4Workloads and Scheduling

The three replicas of web must never share a node. Which scheduling rule achieves that?

  1. A.
    affinity:
      podAntiAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchLabels:
              app: web
          topologyKey: topology.kubernetes.io/zone
  2. B.
    affinity:
      podAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchLabels:
              app: web
          topologyKey: kubernetes.io/hostname
  3. C.
    affinity:
      podAntiAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchLabels:
              app: web
          topologyKey: kubernetes.io/hostname
  4. D.
    affinity:
      podAntiAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchLabels:
              app: db
          topologyKey: kubernetes.io/hostname
Show answer and explanation

Answer: C

Anti-affinity against the Pod's own label with the kubernetes.io/hostname topology key prevents two app=web Pods on the same node.

  • The zone key spreads by zone, allowing several Pods per node.
  • podAffinity attracts Pods to each other.
  • The last option repels app=db Pods, not web.
Sample question 5Storage

You want the StorageClass standard to be used by every PVC that omits storageClassName. Which command makes it the default class?

  1. A.

    kubectl patch storageclass standard -p '{"metadata":{"labels":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

  2. B.

    kubectl set default storageclass standard

  3. C.

    kubectl patch storageclass standard -p '{"spec":{"default":true}}'

  4. D.

    kubectl patch storageclass standard -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

Show answer and explanation

Answer: D

The default class is marked with the annotation storageclass.kubernetes.io/is-default-class: "true". Keep only one default.

  • A label is not read for this purpose.
  • There is no kubectl set default command.
  • StorageClass has no spec.default field.

Courses that prepare you

Questions

Is the CKA readiness check really free?

Yes. Sign up free and take a 15-question, 20-minute check drawn from every exam domain. You get your readiness score, a score per domain and three questions explained. You can retake it every 7 days.

What do I get with Premium?

All 2 full-length CKA exams (40 questions, 90 minutes each) with every answer explained, an AI tutor that explains your mistakes, and a study plan after every exam. Premium also includes every other certification mock test and our career tools.

Are these real exam questions?

No. They are original practice questions written from the official exam guide and its domain weights. They are never copied from the real exam.

How is my score worked out?

A question counts only if you pick exactly the right options. Your percentage is compared with a 66% pass mark, and each domain is scored separately so you know what to study next.

Independent practice material written from the official exam guide. Not affiliated with or endorsed by the exam provider.