【问题标题】:Enabling SSL endpoints in azure container services在 Azure 容器服务中启用 SSL 端点
【发布时间】:2019-12-10 04:42:00
【问题描述】:

我一直在尝试将 SSL 端点添加到托管在 azure 容器服务上的应用程序中。 我在关注文章

https://docs.microsoft.com/en-us/azure/container-instances/container-instances-container-group-ssl#create-a-self-signed-certificate

本文适用于托管在端口 80 上的应用程序。 文章说只打开 443 端口,但我的应用程序在这种情况下没有运行(我的应用程序托管在 8000 上)。 当我打开 8000 时,没有添加任何 SSL 端点。

我的 Deployment.yaml 文件是

api-version: 2018-10-01 location: eastus name: starter properties:   containers:
  - name: nginx-with-ssl
    properties:
      image: nginx
      ports:
      - port: 443
        protocol: TCP
      resources:
        requests:
          cpu: 1.0
          memoryInGB: 1.5
      volumeMounts:
      - name: nginx-config
        mountPath: /etc/nginx
  - name: xxx
    properties:
      environmentVariables:
      image: xxx
      ports:
      - port: 8000
        protocol: TCP
      resources:
        requests:
          cpu: 1.0
          memoryInGB: 4  
   volumes:
  - secret:
      ssl.crt: xxx
      ssl.key: xxx
      nginx.conf: xxx
    name: nginx-config   imageRegistryCredentials:
  - server: xxx
    username: xxx
    password: xxx   ipAddress:
    ports:
    - port: 443
      protocol: TCP
    dnsNameLabel: xxx
    type: Public  
    osType: Linux tags: null
  type: Microsoft.ContainerInstance/containerGroups

我在这里做错了什么?

【问题讨论】:

    标签: azure containers


    【解决方案1】:

    您应该配置 nginx 来执行代理和配置 ssl\redirection 等。this part 详细介绍了这一点。但原则上这是你应该用 nginx(在你的 nginx 配置文件中)而不是用 ACI 做的事情。

    你最好问关于服务器故障的 nxing 配置问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-09
      • 2021-11-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-07
      • 1970-01-01
      相关资源
      最近更新 更多