Challenge - 5 Problems
TCP Probe Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
TCP Probe Success Check
Given this Kubernetes pod spec snippet with a TCP liveness probe, what will be the status of the pod if the TCP port is open and responding?
Kubernetes
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10Attempts:
2 left
💡 Hint
Think about what a successful TCP probe means for pod health.
✗ Incorrect
A TCP liveness probe checks if the specified port is open. If it is, Kubernetes considers the pod healthy and does not restart it.
❓ Configuration
intermediate2:00remaining
Correct TCP Probe YAML Syntax
Which of the following YAML snippets correctly configures a TCP readiness probe on port 3306 with an initial delay of 15 seconds?
Attempts:
2 left
💡 Hint
Check the exact field names and data types for TCP probes in Kubernetes.
✗ Incorrect
The correct field for port is 'port' as an integer, and the delay field is 'initialDelaySeconds'. Quoting the port or using wrong field names causes errors.
❓ Troubleshoot
advanced2:00remaining
TCP Probe Fails Despite Open Port
A pod's TCP liveness probe on port 9090 keeps failing, but manual checks confirm the port is open and accepting connections. What is the most likely cause?
Attempts:
2 left
💡 Hint
Think about network interfaces and how probes connect to pods.
✗ Incorrect
If the container listens only on localhost (127.0.0.1), the probe from Kubernetes cannot reach it via the pod IP, causing failures despite the port being open inside the container.
🔀 Workflow
advanced2:00remaining
Implementing a TCP Readiness Probe
You want to add a TCP readiness probe to a deployment to check port 8081 every 10 seconds with a 5-second initial delay. Which kubectl command applies this configuration correctly from a YAML file named 'probe.yaml'?
Attempts:
2 left
💡 Hint
Remember how kubectl applies YAML configurations.
✗ Incorrect
The 'kubectl apply -f' command applies the YAML file changes. Other commands are invalid or do not exist.
✅ Best Practice
expert2:00remaining
Best Practice for TCP Probe Configuration
Which practice is best when configuring TCP probes for a stateful application that takes time to start and open its port?
Attempts:
2 left
💡 Hint
Consider startup time and avoiding unnecessary restarts.
✗ Incorrect
A high initial delay allows the app to start and open ports before probes begin. Reasonable timeout avoids marking the pod unhealthy too soon.