<p>i have deployed swagger UI on Kubernetes. now it's not sending a request to internal service of Kubernetes when clicking on the <code>Try it out</code> button. </p>

<p>Since all service running locally in Kubernetes we have to use <code>HTTP</code> but my swagger UI is on <code>HTTPS</code> so getting mixed content error also.</p>

<p>is there any way we can invoke internal service using swagger UI running inside Kubernetes.</p>

<p>this is my demo swagger.yaml : </p>

<pre><code>openapi: 3.0.1
servers:
  - url: '{scheme}://test-service'
    variables:
      scheme:
        description: 'The Data Set API is accessible via https and http'
        enum:
          - 'https'
          - 'http'
        default: 'https'
info:
  description: &gt;-
</code></pre>

<p>i would rather suggest using ingress and add further rule with <code>https</code> domain.</p>

<p>ingress : </p>

<pre><code> apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/cluster-issuer: swagger-staging
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /$2
  name: swagger-ingress
  namespace: default
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /test-service(/|$)(.*)
        backend:
          serviceName: service-1
          servicePort: 80
      - path: service-2(/|$)(.*)
        backend:
          serviceName: service-2
          servicePort: 80
      - path: /service-3(/|$)(.*)
        backend:
          serviceName: service-3
          servicePort: 80
      - path: /service-4(/|$)(.*)
        backend:
          serviceName: service-4
          servicePort: 80
      - path: /service-5(/|$)(.*)
        backend:
          serviceName: service-5
          servicePort: 80
</code></pre>

<p>note : if you will try updating ingress with https and later try with port-forward it will not work and same give error of browser mixed content .</p>
