入口控制器强制端口80(HTTP)上的SSL

时间:2019-07-03 15:29:24

标签: azure ssl kubernetes kubernetes-ingress nginx-ingress

我正在Kubernetes中运行一个node.js应用程序,并且我正在使用入口控制器在端口443上使用SSL。它正在工作,但是它迫使我也必须在端口80上使用SSL。想。

我尝试将nginx.ingress.kubernetes.io/ssl-redirect:“ false”添加到我的入口,但是它仍然在端口80上强制使用SSL。入口配置如下所示:

{
  "kind": "Ingress",
  "apiVersion": "extensions/v1beta1",
  "metadata": {
    "name": "http-rest-api-ingress",
    "namespace": "default",
    "selfLink": "/apis/extensions/v1beta1/namespaces/default/ingresses/http-rest-api-ingress",
    "uid": "f89ad4cd-9d9d-11e9-9d4d-1aa06e634f15",
    "resourceVersion": "1990981",
    "generation": 2,
    "creationTimestamp": "2019-07-03T14:22:21Z",
    "annotations": {
      "nginx.ingress.kubernetes.io/rewrite-target": "/$1",
      "nginx.ingress.kubernetes.io/ssl-redirect": "false"
    }
  },
  "spec": {
    "rules": [
      {
        "host": "x.x.com",
        "http": {
          "paths": [
            {
              "backend": {
                "path": "/(.*)",
                "serviceName": "http-rest-api",
                "servicePort": 4500
              }
            }
          ]
        }
      }
    ]
  },
  "status": {
    "loadBalancer": {
      "ingress": [
        {}
      ]
    }
  }
}

0 个答案:

没有答案