Debugging issues with your application

    Check your deploy command output to see whether it succeeded or not. If your deployment process was terminated, you should see an error message in the output that describes the reason why the deployment failed.

    This kind of failure is most likely due to either a misconfigured manifest or wrong command. For example, the following output says that you must configure route traffic percent to sum to 100:

    Run the following command to get the of the Route object with which you deployed your application:

    1. kubectl get route <route-name> --output yaml

    The conditions in status provide the reason if there is any failure. For details, see Knative Error Conditions and Reporting.

    To list all Ingress resources and their corresponding labels, run the following command:

    1. NAME LABELS
    2. helloworld-go map[serving.knative.dev/route:helloworld-go serving.knative.dev/routeNamespace:default serving.knative.dev/service:helloworld-go]

    The labels serving.knative.dev/route and serving.knative.dev/routeNamespace indicate the Route in which the Ingress resource resides. Your Route and Ingress should be listed. If your Ingress does not exist, the route controller believes that the Revisions targeted by your Route/Service isn’t ready. Please proceed to later sections to diagnose Revision readiness status.

    Otherwise, run the following command to look at the ClusterIngress created for your Route

    1. kubectl get ingresses.networking.internal.knative.dev <INGRESS_NAME> --output yaml

    particularly, look at the status: section. If the Ingress is working correctly, we should see the condition with type=Ready to have status=True. Otherwise, there will be error messages.

    the network configuration in VirtualService must match that of Ingress and Route. VirtualService currently doesn’t expose a Status field, so if one exists and have matching configurations with Ingress and Route, you may want to wait a little bit for those settings to propagate.

    If you are familar with Istio and istioctl, you may try using istioctl to look deeper using Istio .

    Check Ingress status

    Knative uses a LoadBalancer service called istio-ingressgateway Service.

    To check the IP address of your Ingress, use

    1. kubectl get svc -n istio-system istio-ingressgateway

    If there is no external IP address, use

    1. kubectl describe svc istio-ingressgateway -n istio-system

    to see a reason why IP addresses weren’t provisioned. Most likely it is due to a quota issue.

    If you configure your Route with Configuration, run the following command to get the name of the Revision created for you deployment (look up the configuration name in the Route .yaml file):

    1. kubectl get configuration <configuration-name> --output jsonpath="{.status.latestCreatedRevisionName}"

    If you configure your Route with Revision directly, look up the revision name in the Route yaml file.

    A ready should have the following condition in status:

    1. conditions:
    2. - reason: ServiceReady
    3. type: Ready

    If you see this condition, check the following to continue debugging:

    If you see other conditions, look up the meaning of the conditions in Knative Error Conditions and Reporting. Note: some of them are not implemented yet. An alternative is to .

    To get the Pods for all your deployments:

    1. kubectl get pods

    This command should list all Pods with brief status. For example:

    1. NAME READY STATUS RESTARTS AGE
    2. configuration-example-00001-deployment-659747ff99-9bvr4 2/2 Running 0 3h
    3. configuration-example-00002-deployment-5f475b7849-gxcht 1/2 CrashLoopBackOff 2 36s

    Choose one and use the following command to see detailed information for its status. Some useful fields are conditions and :

    Was this page helpful?

    Glad to hear it! Please tell us how we can improve.