Certified Kubernetes Application Developer (CKAD) · Free practice question 8 of 12
tcpSocket probe for a non-HTTP server
A Redis-compatible cache at Zennor Systems listens on TCP 6379 and has no HTTP endpoint or health command in the image. Which readiness check is the simplest built-in option?
- A.readinessProbe: {exec: {command: [redis-cli, ping]}}
- B.readinessProbe: {tcpSocket: {port: 6379}}
- C.readinessProbe: {httpGet: {port: 6379, path: /}}
- D.readinessProbe: {grpc: {port: 6379}}
Show answer and explanation
Correct answer: B. readinessProbe: {tcpSocket: {port: 6379}}
Why: A tcpSocket probe succeeds if the kubelet can open a TCP connection to the port, which needs nothing in the image. httpGet would send HTTP that the server does not speak, the exec probe needs a client binary the image lacks, and a grpc probe requires the gRPC health service.
More free Certified Kubernetes Application Developer (CKAD) questions
- Generating a Pod manifest skeleton
- Downward API Pod IP as env
- fsGroup for shared volume ownership
- Indexed Job completion index
- Pulling and unpacking a chart locally
- Kustomize namePrefix and references
- Watching Pod status changes live
- ExternalName Service for an outside host
- StatefulSet per-Pod DNS name
- Ways to consume a Secret in a container
- Checking quota usage in a namespace