Kubernetes - Health Checks and ProbesWhich of the following is the correct syntax snippet for a TCP readiness probe in a pod spec?AreadinessProbe: exec: command: ['curl', '-f', 'http://localhost:8080'] timeoutSeconds: 3BreadinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 5CreadinessProbe: tcpSocket: path: /check periodSeconds: 10DreadinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 5 periodSeconds: 10Check Answer
Step-by-Step SolutionSolution:Step 1: Identify TCP probe syntaxTCP probe uses tcpSocket with port number, no path field.Step 2: Check optionsreadinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 5 periodSeconds: 10 correctly uses tcpSocket with port and timing fields.Final Answer:Correct TCP readiness probe syntax with tcpSocket and port -> Option DQuick Check:TCP probe syntax = tcpSocket with port [OK]Quick Trick: TCP probes use tcpSocket with port, no path [OK]Common Mistakes:Using httpGet or exec instead of tcpSocketAdding path field to tcpSocketOmitting port number
Master "Health Checks and Probes" in Kubernetes9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kubernetes Quizzes Ingress - Why Ingress manages external access - Quiz 7medium Ingress - Path-based routing - Quiz 2easy Networking - Service mesh concept overview - Quiz 12easy Networking - Why Kubernetes networking matters - Quiz 14medium Resource Management - Cluster Autoscaler concept - Quiz 13medium Resource Management - Vertical Pod Autoscaler concept - Quiz 4medium Resource Management - CPU requests and limits - Quiz 15hard Resource Management - Horizontal Pod Autoscaler - Quiz 14medium Scheduling - DaemonSets for per-node workloads - Quiz 12easy Secrets - Using Secrets as mounted volumes - Quiz 7medium