Troubleshooting a Knative Installation

This page describes how you can troubleshoot a Knative installation. Please try these instructions before filing a bug report.

Check if all containers are running, ready and healthy

Note

The outputs below are just examples. The containers may vary depending on the installation and configuration. Please make sure all containers are running, ready and healthy (look for the 1/1 in the following examples) or are Complete (in case of jobs).

Knative Serving Components

  1. kubectl get pods -n knative-serving
  2. NAME READY STATUS RESTARTS AGE
  3. activator-6b9dc4c9db-cl56b 1/1 Running 0 2m
  4. autoscaler-77f9b75856-f88qw 1/1 Running 0 2m
  5. controller-7dcb56fdb6-dbzrp 1/1 Running 0 2m
  6. domain-mapping-6bb8f95654-c575d 1/1 Running 0 2m
  7. domainmapping-webhook-c77dcfcfb-hg2wv 1/1 Running 0 2m
  8. webhook-78dc6ddddb-6868n 1/1 Running 0 2m

Knative Serving Networking Layer

KourierIstioContour

  1. kubectl get pods -n knative-serving
  2. NAME READY STATUS RESTARTS AGE
  3. net-kourier-controller-5fcbb6d996-fprpd 1/1 Running 0 103s
  1. kubectl get pods -n kourier-system
  2. NAME READY STATUS RESTARTS AGE
  3. 3scale-kourier-gateway-86b9f6dc44-xpn6h 1/1 Running 0 2m22s
  1. kubectl get pods -n knative-serving
  2. NAME READY STATUS RESTARTS AGE
  3. net-istio-controller-ccc455b58-f98ld 1/1 Running 0 19s
  4. net-istio-webhook-7558dbfc64-5jmt6 1/1 Running 0 19s
  1. kubectl get pods -n istio-system
  2. NAME READY STATUS RESTARTS AGE
  3. istio-ingressgateway-c7b9f6477-bgr6q 1/1 Running 0 44s
  4. istiod-79d65bf5f4-5zvtj 1/1 Running 0 29s
  1. kubectl get pods -n knative-serving
  2. NAME READY STATUS RESTARTS AGE
  3. net-contour-controller-68547b797c-dl8pf 1/1 Running 0 14s
  1. kubectl get pods -n contour-external
  2. NAME READY STATUS RESTARTS AGE
  3. contour-7b995cdb68-jg5s8 1/1 Running 0 41s
  4. contour-certgen-v1.24.2-zmr9r 0/1 Completed 0 41s
  5. envoy-xkzck 2/2 Running 0 41s
  1. kubectl get pods -n contour-internal
  2. NAME READY STATUS RESTARTS AGE
  3. contour-57fcf576fd-wb57c 1/1 Running 0 55s
  4. contour-certgen-v1.24.2-gqgrx 0/1 Completed 0 55s
  5. envoy-rht69 2/2 Running 0 55s

Knative Eventing

  1. kubectl get pods -n knative-eventing
  2. NAME READY STATUS RESTARTS AGE
  3. eventing-controller-bb8b689c4-lk6pq 1/1 Running 0 41s
  4. eventing-webhook-577bb88ccd-hcz5p 1/1 Running 0 41s

Check if there are any errors logged in the Knative components

  1. kubectl logs -n knative-serving <pod-name>
  2. kubectl logs -n knative-eventing <pod-name>
  3. kubectl logs -n <ingress-namespaces> <pod-namespaces> # see above for the relevant namespaces
  4. # For example
  5. kubectl logs -n knative-serving activator-6b9dc4c9db-cl56b
  6. 2023/05/01 11:52:51 Registering 3 clients
  7. 2023/05/01 11:52:51 Registering 3 informer factories
  8. 2023/05/01 11:52:51 Registering 4 informers

Check the status of the Knative Resources

Knative Serving

  1. kubectl describe -n <namespace> kservice
  2. kubectl describe -n <namespace> config
  3. kubectl describe -n <namespace> revision
  4. kubectl describe -n <namespace> sks # Serverless Service
  5. kubectl describe -n <namespace> kingress # Knative Ingress
  6. kubectl describe -n <namespace> rt # Knative Route
  7. kubectl describe -n <namespace> dm # Domain-Mapping
  8. # Check the status at the end. For example
  9. kubectl describe -n default kservice
  10. ... omitted ...
  11. Status:
  12. Address:
  13. URL: http://hello.default.svc.cluster.local
  14. Conditions:
  15. Last Transition Time: 2023-05-01T12:08:18Z
  16. Status: True
  17. Type: ConfigurationsReady
  18. Last Transition Time: 2023-05-01T12:08:18Z
  19. Status: True
  20. Type: Ready
  21. Last Transition Time: 2023-05-01T12:08:18Z
  22. Status: True
  23. Type: RoutesReady
  24. Latest Created Revision Name: hello-00001
  25. Latest Ready Revision Name: hello-00001
  26. Observed Generation: 1
  27. Traffic:
  28. Latest Revision: true
  29. Percent: 100
  30. Revision Name: hello-00001
  31. URL: http://hello.default.10.89.0.200.sslip.io
  32. Events:
  33. Type Reason Age From Message
  34. ---- ------ ---- ---- -------
  35. Normal Created 45s service-controller Created Configuration "hello"
  36. Normal Created 45s service-controller Created Route "hello"

Knative Eventing

  1. kubectl describe -n <namespace> brokers
  2. kubectl describe -n <namespace> eventtypes
  3. kubectl describe -n <namespace> triggers
  4. kubectl describe -n <namespace> channels
  5. kubectl describe -n <namespace> subscriptions
  6. kubectl describe -n <namespace> apiserversources
  7. kubectl describe -n <namespace> containersources
  8. kubectl describe -n <namespace> pingsources
  9. kubectl describe -n <namespace> sinkbindings
  10. # Check the status at the end. For example
  11. kubectl describe -n default brokers
  12. ... omitted ...
  13. Status:
  14. Annotations:
  15. bootstrap.servers: my-cluster-kafka-bootstrap.kafka:9092
  16. default.topic.partitions: 10
  17. default.topic.replication.factor: 3