Kube-probe TCP probe failed: network unreachable

The network is not properly configured, preventing the probe from reaching the application.

Understanding Kube-probe

Kube-probe is a diagnostic tool used in Kubernetes to monitor the health of applications running within a cluster. It helps in determining the availability and readiness of pods by sending periodic probes to the application endpoints. These probes can be of different types, such as HTTP, TCP, or command-based, and are crucial for maintaining the desired state of applications.

Identifying the Symptom

One common issue that users encounter is the error message: TCP probe failed: network unreachable. This indicates that the TCP probe initiated by Kube-probe is unable to reach the specified application endpoint, suggesting a potential network configuration issue.

Analyzing the Issue

The error code 'network unreachable' typically points to a misconfiguration in the network settings, which prevents the probe from accessing the target application. This could be due to incorrect routing, firewall rules, or network policies that block the necessary traffic.

Common Causes

  • Misconfigured network policies that restrict traffic.
  • Incorrect routing tables that do not direct traffic correctly.
  • Firewall settings blocking the probe's traffic.

Steps to Resolve the Issue

To resolve the 'network unreachable' error, follow these steps:

Step 1: Verify Network Policies

Check the network policies applied to your Kubernetes cluster. Ensure that the policies allow traffic from the probe to the application endpoint. You can list the current network policies using:

kubectl get networkpolicies -n <namespace>

Review the policies and update them if necessary to allow the required traffic.

Step 2: Check Routing Tables

Ensure that the routing tables are correctly configured. You can inspect the routing tables on the nodes using:

ip route show

Look for any anomalies or missing routes that could prevent the probe from reaching the application.

Step 3: Review Firewall Rules

Examine the firewall settings on your nodes and any external firewalls that might affect traffic. Ensure that the necessary ports are open for the probe to communicate with the application. You can use:

iptables -L

Adjust the rules as needed to allow the probe traffic.

Step 4: Test Connectivity

After making changes, test the connectivity from the probe to the application endpoint. You can use tools like curl or nmap to verify that the endpoint is reachable.

Conclusion

By following these steps, you should be able to resolve the 'network unreachable' error encountered by Kube-probe. Ensuring proper network configuration is key to maintaining the health and availability of your applications in a Kubernetes environment. For more information on network policies, visit the Kubernetes Network Policies documentation.

Master

Kube-probe

in Minutes — Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the whitepaper on your email!
Oops! Something went wrong while submitting the form.

Kube-probe

Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the whitepaper on your email!
Oops! Something went wrong while submitting the form.

MORE ISSUES

Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid