Recall & Review
beginner
What is a TCP probe in Kubernetes?
A TCP probe checks if a container is accepting TCP connections on a specified port. It helps Kubernetes know if the container is healthy by trying to open a TCP connection.
Click to reveal answer
beginner
Which Kubernetes probe type uses a TCP socket to check container health?
The TCP Socket probe type uses a TCP connection to check if the container is ready or alive.
Click to reveal answer
intermediate
What fields are required to configure a TCP probe in a Kubernetes pod spec?
You need to specify
tcpSocket with a port number. Optionally, you can set initialDelaySeconds, periodSeconds, and timeoutSeconds.Click to reveal answer
intermediate
How does Kubernetes react if a TCP probe fails?
If the TCP probe fails, Kubernetes considers the container unhealthy. For liveness probes, it may restart the container. For readiness probes, it stops sending traffic to the container.
Click to reveal answer
beginner
Example snippet: How to define a TCP readiness probe on port 8080 in a pod spec?
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 1
Click to reveal answer
What does a TCP probe check in Kubernetes?
✗ Incorrect
A TCP probe tries to open a TCP connection to check container health.
Which field specifies the port number in a TCP probe configuration?
✗ Incorrect
The 'port' field inside 'tcpSocket' defines the port to check.
What happens if a liveness TCP probe fails repeatedly?
✗ Incorrect
Failing liveness probes cause Kubernetes to restart the container.
Which probe type can use a TCP socket check?
✗ Incorrect
Both liveness and readiness probes can use TCP socket checks.
What is the purpose of 'initialDelaySeconds' in a TCP probe?
✗ Incorrect
'initialDelaySeconds' sets how long to wait before the first probe.
Explain how to configure a TCP readiness probe in a Kubernetes pod and why it is useful.
Think about how Kubernetes decides if a container is ready to receive requests.
You got /4 concepts.
Describe what happens when a TCP liveness probe fails and how Kubernetes responds.
Consider how Kubernetes keeps containers healthy automatically.
You got /4 concepts.