0
0
Kubernetesdevops~5 mins

TCP probe configuration in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AIf the container accepts TCP connections on a port
BIf the container returns HTTP status 200
CIf the container's CPU usage is low
DIf the container's disk space is sufficient
Which field specifies the port number in a TCP probe configuration?
Aport
Bpath
Ccommand
Dhost
What happens if a liveness TCP probe fails repeatedly?
AKubernetes ignores the failure
BKubernetes deletes the pod permanently
CKubernetes restarts the container
DKubernetes scales the pod up
Which probe type can use a TCP socket check?
ANone of the above
BLiveness and Readiness probes
COnly Readiness probes
DOnly Liveness probes
What is the purpose of 'initialDelaySeconds' in a TCP probe?
ANumber of retries before failure
BTimeout for each probe attempt
CInterval between probes
DWait time before starting probes after container start
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.