CKAD mock exam 4, Q 18 and Q 21

there seems to be an issue validating the target pods associated with Q 18 and Q 21. The grader is unable to find the pods in question even though they are running fine

below Yaml from running pods

apiVersion: v1
kind: Pod
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"creationTimestamp":"2025-01-01T08:01:24Z","labels":{"name":"analytics-app"},"name":"analytics-app","namespace":"default","resourceVersion":"6060","uid":"5b3b73f5-a136-418e-b70e-67187ff716bc"},"spec":{"containers":[{"image":"kodekloud/webapp-delayed-start","imagePullPolicy":"Always","name":"simple-webapp","ports":[{"containerPort":8080,"protocol":"TCP"}],"readinessProbe":{"httpGet":{"path":"/ready","port":8080}},"resources":{},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","volumeMounts":[{"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount","name":"kube-api-access-lzzls","readOnly":true}]}],"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"nodeName":"cluster1-node01","preemptionPolicy":"PreemptLowerPriority","priority":0,"restartPolicy":"Always","schedulerName":"default-scheduler","securityContext":{},"serviceAccount":"default","serviceAccountName":"default","terminationGracePeriodSeconds":30,"tolerations":[{"effect":"NoExecute","key":"node.kubernetes.io/not-ready","operator":"Exists","tolerationSeconds":300},{"effect":"NoExecute","key":"node.kubernetes.io/unreachable","operator":"Exists","tolerationSeconds":300}],"volumes":[{"name":"kube-api-access-lzzls","projected":{"defaultMode":420,"sources":[{"serviceAccountToken":{"expirationSeconds":3607,"path":"token"}},{"configMap":{"items":[{"key":"ca.crt","path":"ca.crt"}],"name":"kube-root-ca.crt"}},{"downwardAPI":{"items":[{"fieldRef":{"apiVersion":"v1","fieldPath":"metadata.namespace"},"path":"namespace"}]}}]}}]},"status":{"conditions":[{"lastProbeTime":null,"lastTransitionTime":"2025-01-01T08:01:26Z","status":"True","type":"PodReadyToStartContainers"},{"lastProbeTime":null,"lastTransitionTime":"2025-01-01T08:01:24Z","status":"True","type":"Initialized"},{"lastProbeTime":null,"lastTransitionTime":"2025-01-01T08:01:26Z","status":"True","type":"Ready"},{"lastProbeTime":null,"lastTransitionTime":"2025-01-01T08:01:26Z","status":"True","type":"ContainersReady"},{"lastProbeTime":null,"lastTransitionTime":"2025-01-01T08:01:24Z","status":"True","type":"PodScheduled"}],"containerStatuses":[{"containerID":"containerd://a0601ab1556a402b5604ca4ec05ac3c50cda1f175534ff31ae851c1cdb0fdca9","image":"docker.io/kodekloud/webapp-delayed-start:latest","imageID":"docker.io/kodekloud/webapp-delayed-start@sha256:666b95c2ef8e00a74fa0ea96def8d9d69104ec5d9b9b0f49d8a76bd4c94ad343","lastState":{},"name":"simple-webapp","ready":true,"restartCount":0,"started":true,"state":{"running":{"startedAt":"2025-01-01T08:01:25Z"}}}],"hostIP":"192.168.36.212","hostIPs":[{"ip":"192.168.36.212"}],"phase":"Running","podIP":"10.42.1.14","podIPs":[{"ip":"10.42.1.14"}],"qosClass":"BestEffort","startTime":"2025-01-01T08:01:24Z"}}
  creationTimestamp: "2025-01-01T08:07:40Z"
  labels:
    name: analytics-app
  name: analytics-app
  namespace: default
  resourceVersion: "6276"
  uid: c7def70d-3bfd-4205-a2c3-60a9fdd3fce7
spec:
  containers:
  - image: kodekloud/webapp-delayed-start
    imagePullPolicy: Always
    name: simple-webapp
    ports:
    - containerPort: 8080
      protocol: TCP
    readinessProbe:
      failureThreshold: 3
      httpGet:
        path: /ready
        port: 8080
        scheme: HTTP
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 1
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-lzzls
      readOnly: true
  dnsPolicy: ClusterFirst
  enableServiceLinks: true
  nodeName: cluster1-node01
  preemptionPolicy: PreemptLowerPriority
  priority: 0
  restartPolicy: Always
  schedulerName: default-scheduler
  securityContext: {}
  serviceAccount: default
  serviceAccountName: default
  terminationGracePeriodSeconds: 30
  tolerations:
  - effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  - effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
  volumes:
  - name: kube-api-access-lzzls
    projected:
      defaultMode: 420
      sources:
      - serviceAccountToken:
          expirationSeconds: 3607
          path: token
      - configMap:
          items:
          - key: ca.crt
            path: ca.crt
          name: kube-root-ca.crt
      - downwardAPI:
          items:
          - fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
            path: namespace
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T08:07:42Z"
    status: "True"
    type: PodReadyToStartContainers
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T08:07:40Z"
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T08:07:42Z"
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T08:07:42Z"
    status: "True"
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T08:07:40Z"
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: containerd://92bd535880d38cb2390b6e44a395de90b9e33c191c7793b2076fe7101f8eebc9
    image: docker.io/kodekloud/webapp-delayed-start:latest
    imageID: docker.io/kodekloud/webapp-delayed-start@sha256:666b95c2ef8e00a74fa0ea96def8d9d69104ec5d9b9b0f49d8a76bd4c94ad343
    lastState: {}
    name: simple-webapp
    ready: true
    restartCount: 0
    started: true
    state:
      running:
        startedAt: "2025-01-01T08:07:41Z"
  hostIP: 192.168.36.212
  hostIPs:
  - ip: 192.168.36.212
  phase: Running
  podIP: 10.42.1.16
  podIPs:
  - ip: 10.42.1.16
  qosClass: BestEffort
  startTime: "2025-01-01T08:07:40Z"
apiVersion: v1
kind: Pod
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"ckad-probe-aom","namespace":"default"},"spec":{"containers":[{"image":"nginx","livenessProbe":{"exec":{"command":["ls"]},"initialDelaySeconds":5},"name":"nginx"}]}}
  creationTimestamp: "2025-01-01T07:52:37Z"
  name: ckad-probe-aom
  namespace: default
  resourceVersion: "5681"
  uid: 8e062be0-dd57-40d7-85a5-3b04bd10b1e2
spec:
  containers:
  - image: nginx
    imagePullPolicy: Always
    livenessProbe:
      exec:
        command:
        - ls
      failureThreshold: 3
      initialDelaySeconds: 5
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 1
    name: nginx
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-rmxjn
      readOnly: true
  dnsPolicy: ClusterFirst
  enableServiceLinks: true
  nodeName: cluster1-node01
  preemptionPolicy: PreemptLowerPriority
  priority: 0
  restartPolicy: Always
  schedulerName: default-scheduler
  securityContext: {}
  serviceAccount: default
  serviceAccountName: default
  terminationGracePeriodSeconds: 30
  tolerations:
  - effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  - effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
  volumes:
  - name: kube-api-access-rmxjn
    projected:
      defaultMode: 420
      sources:
      - serviceAccountToken:
          expirationSeconds: 3607
          path: token
      - configMap:
          items:
          - key: ca.crt
            path: ca.crt
          name: kube-root-ca.crt
      - downwardAPI:
          items:
          - fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
            path: namespace
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T07:52:38Z"
    status: "True"
    type: PodReadyToStartContainers
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T07:52:37Z"
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T07:52:38Z"
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T07:52:38Z"
    status: "True"
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: "2025-01-01T07:52:37Z"
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: containerd://394080eeb153af60b648378f7b873bdb9d88a06c4edc2d98b6fd07989ae903d2
    image: docker.io/library/nginx:latest
    imageID: docker.io/library/nginx@sha256:42e917aaa1b5bb40dd0f6f7f4f857490ac7747d7ef73b391c774a41a8b994f15
    lastState: {}
    name: nginx
    ready: true
    restartCount: 0
    started: true
    state:
      running:
        startedAt: "2025-01-01T07:52:38Z"
  hostIP: 192.168.36.212
  hostIPs:
  - ip: 192.168.36.212
  phase: Running
  podIP: 10.42.1.12
  podIPs:
  - ip: 10.42.1.12
  qosClass: BestEffort
  startTime: "2025-01-01T07:52:37Z"

Not sure what your issue is. I tried both of these, and the grader liked my solutions for both.

For Q18, the only change was the livenessProbe:

livenessProbe:
  exec:
    command:
      - ls
  initialDelaySeconds: 5
  periodSeconds: 5

Q21, a readinessProbe:

readinessProbe:
  httpGet:
    path: /ready
    port: 8080