How to Troubleshoot the Ingress for Your Kubernetes Cluster
Issues with your Kubernetes cluster? If Pods and Service are fine, the problem might be the Ingress. Follow this guide for step-by-step troubleshooting.
Issues with your Kubernetes cluster? If Pods and Service are fine, the problem might be the Ingress. Follow this guide for step-by-step troubleshooting.
First, you should ensure that your Pods are ready and running. If you’re still at that stage, you can use some of our other guides on running a global health check on your Pods, or solving specific issues like Pods stuck in a pending state, or errors like CrashLoopBackOff, ImagePullBackOff, and RunContainerError.
Next, you should check that your Service is routing traffic to Pods. You can use this troubleshooting guide for your Service.
If you have completed those checks and you’re still having issues, then it is likely that the Ingress is misconfigured.
In this guide, we’ll walk you through the common steps of troubleshooting the Ingress configuration.
So, your Pods are Running and Ready, and your Service configuration is routing traffic correctly. Next, the Ingress should connect traffic to your Service and Pods correctly.
Before getting into the weeds, the first thing to check is that the values listed for service.name and service.port in your Ingress configuration are correct.
To inspect the Ingress configuration for “demo-ingress”, you can use the following command:
You’ll see an output that looks like this:
If the "Backends" column is empty, you have an error in the configuration.
If there are endpoints in the "Backends" column but you still cannot access your application, you should check how you exposed your ingress and cluster to the public internet.
To identify if it's an issue with your infrastructure or your Ingress controller, you should try connecting the Ingress to the Pod directly.
To do so, you need to isolate infrastructure issues from ingress by connecting directly to the Pod with the Ingress controller. This learnK8s guide has a useful example of how to do that:
Now, when you visit port 3000 on your computer, the request is forwarded to port 80 on the Pod. If the application works now, the issue is related to your infrastructure and you need to look into how traffic is routed to your cluster.
If your application still doesn’t work, then you should debug your Ingress controller.
There are multiple types of Ingress controllers that teams use, and troubleshooting steps vary for each. You can review debugging instructions for your specific controller.
Debugging guides:
Troubleshooting Kubernetes issues is often a process of elimination where you collect information and cross out likely reasons. This can take a lot of time and research, depending on your issue.
There’s an easier and faster way to manage your Kubernetes troubleshooting.
With Blink, you can use no-code steps to readily pull all the key information and events to help you solve your issue. We have pre-built automations ready to help you work through common Pod, Service, and Ingress issues.
Get started with Blink and jumpstart your Kubernetes troubleshooting today.
Blink is secure, decentralized, and cloud-native. Get modern cloud and security operations today.