Kiali UI not showing API Docs tab

35 Views Asked by At

I'm trying to get Kiali to show my swagger docs in the UI but it doesn't.

Here is the service definition

% kubectl describe service/plans-api --namespace plans --context dd-stag
Name:              plans-api
Namespace:         plans
Labels:            repository=plans
                   service=plans-api
                   skaffold.dev/run-id=x
Annotations:       kiali.io/api-spec: http://plans-api.plans/swagger/doc.json
                   kiali.kubernetes.io/api-type: rest
Selector:          app=plans-api,repository=plans,service=plans-api
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                172.16.21.55
IPs:               172.16.21.55
Port:              plans-api  80/TCP
TargetPort:        8080/TCP
Endpoints:         172.20.1.131:8080
Session Affinity:  None
Events:            <none>

then, this is what I get. See that API Docs tab is not showing:
Screenshot 2023-09-29 at 13 36 18

Scraping a bit with the inspector, I can see that the annotation for the service is in place:

{
{
    "service": {
        "name": "plans-api",
        "createdAt": "2023-09-26T07:40:16Z",
        "resourceVersion": "447498536",
        "namespace": {
            "name": "plans",
            "cluster": "",
            "isAmbient": false,
            "labels": null,
            "annotations": null
        },
        "labels": {
            "repository": "plans",
            "service": "plans-api",
            "skaffold.dev/run-id": "x"
        },
        "selectors": {
            "app": "plans-api",
            "repository": "plans",
            "service": "plans-api"
        },
        "type": "ClusterIP",
        "ip": "172.16.21.55",
        "ports": [
            {
                "name": "plans-api",
                "protocol": "TCP",
                "istioProtocol": "UnsupportedProtocol",
                "port": 80,
                "tlsMode": "istio"
            }
        ],
        "externalName": "",
        "annotations": {
            "kiali.io/api-spec": "http://plans-api.plans/swagger/doc.json", // <- 
            "kiali.kubernetes.io/api-type": "rest", // <-
            "kubectl.kubernetes.io/last-applied-configuration": "x"
        },
        "healthAnnotations": {},
        "additionalDetails": []
    },
    ...
}

I'm unsure if it is a bug or a misconfiguration from my side. Any help is appreciated :)

0

There are 0 best solutions below