You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-instances/container-instances-container-group-ssl.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,30 @@
1
1
---
2
-
title: Enable SSL with sidecar container
2
+
title: Enable TLS with sidecar container
3
3
description: Create an SSL or TLS endpoint for a container group running in Azure Container Instances by running Nginx in a sidecar container
4
4
ms.topic: article
5
5
ms.date: 02/14/2020
6
6
---
7
-
# Enable an SSL endpoint in a sidecar container
7
+
# Enable a TLS endpoint in a sidecar container
8
8
9
-
This article shows how to create a [container group](container-instances-container-groups.md) with an application container and a sidecar container running an SSL provider. By setting up a container group with a separate SSL endpoint, you enable SSL connections for your application without changing your application code.
9
+
This article shows how to create a [container group](container-instances-container-groups.md) with an application container and a sidecar container running a TLS/SSL provider. By setting up a container group with a separate TLS endpoint, you enable TLS connections for your application without changing your application code.
10
10
11
11
You set up an example container group consisting of two containers:
12
12
* An application container that runs a simple web app using the public Microsoft [aci-helloworld](https://hub.docker.com/_/microsoft-azuredocs-aci-helloworld) image.
13
-
* A sidecar container running the public [Nginx](https://hub.docker.com/_/nginx) image, configured to use SSL.
13
+
* A sidecar container running the public [Nginx](https://hub.docker.com/_/nginx) image, configured to use TLS.
14
14
15
15
In this example, the container group only exposes port 443 for Nginx with its public IP address. Nginx routes HTTPS requests to the companion web app, which listens internally on port 80. You can adapt the example for container apps that listen on other ports.
16
16
17
-
See [Next steps](#next-steps) for other approaches to enabling SSL in a container group.
17
+
See [Next steps](#next-steps) for other approaches to enabling TLS in a container group.
You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete this article. If you'd like to use it locally, version 2.0.55 or later is recommended. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
22
22
23
23
## Create a self-signed certificate
24
24
25
-
To set up Nginx as an SSL provider, you need an SSL certificate. This article shows how to create and set up a self-signed SSL certificate. For production scenarios, you should obtain a certificate from a certificate authority.
25
+
To set up Nginx as a TLS provider, you need a TLS/SSL certificate. This article shows how to create and set up a self-signed TLS/SSL certificate. For production scenarios, you should obtain a certificate from a certificate authority.
26
26
27
-
To create a self-signed SSL certificate, use the [OpenSSL](https://www.openssl.org/) tool available in Azure Cloud Shell and many Linux distributions, or use a comparable client tool in your operating system.
27
+
To create a self-signed TLS/SSL certificate, use the [OpenSSL](https://www.openssl.org/) tool available in Azure Cloud Shell and many Linux distributions, or use a comparable client tool in your operating system.
28
28
29
29
First create a certificate request (.csr file) in a local working directory:
You should now see three files in the directory: the certificate request (`ssl.csr`), the private key (`ssl.key`), and the self-signed certificate (`ssl.crt`). You use `ssl.key` and `ssl.crt` in later steps.
44
44
45
-
## Configure Nginx to use SSL
45
+
## Configure Nginx to use TLS
46
46
47
47
### Create Nginx configuration file
48
48
49
-
In this section, you create a configuration file for Nginx to use SSL. Start by copying the following text into a new file named `nginx.conf`. In Azure Cloud Shell, you can use Visual Studio Code to create the file in your working directory:
49
+
In this section, you create a configuration file for Nginx to use TLS. Start by copying the following text into a new file named `nginx.conf`. In Azure Cloud Shell, you can use Visual Studio Code to create the file in your working directory:
# Optimize SSL by caching session parameters for 10 minutes. This cuts down on the number of expensive SSL handshakes.
90
+
# Optimize TLS/SSL by caching session parameters for 10 minutes. This cuts down on the number of expensive TLS/SSL handshakes.
91
91
# The handshake is the most CPU-intensive operation, and by default it is re-negotiated on every new/parallel connection.
92
92
# By enabling a cache (of type "shared between all Nginx workers"), we tell the client to re-use the already negotiated state.
93
93
# Further optimization can be achieved by raising keepalive_timeout, but that shouldn't be done unless you serve primarily HTTPS.
@@ -118,7 +118,7 @@ http {
118
118
119
119
### Base64-encode secrets and configuration file
120
120
121
-
Base64-encode the Nginx configuration file, the SSL certificate, and the SSL key. In the next section, you enter the encoded contents in a YAML file used to deploy the container group.
121
+
Base64-encode the Nginx configuration file, the TLS/SSL certificate, and the TLS key. In the next section, you enter the encoded contents in a YAML file used to deploy the container group.
122
122
123
123
```console
124
124
cat nginx.conf | base64 > base64-nginx.conf
@@ -215,7 +215,7 @@ Name ResourceGroup Status Image
215
215
app-with-ssl myresourcegroup Running nginx, mcr.microsoft.com/azuredocs/aci-helloworld 52.157.22.76:443 Public 1.0 core/1.5 gb Linux westus
216
216
```
217
217
218
-
## Verify SSL connection
218
+
## Verify TLS connection
219
219
220
220
Use your browser to navigate to the public IP address of the container group. The IP address shown in this example is `52.157.22.76`, so the URL is **https://52.157.22.76**. You must use HTTPS to see the running application, because of the Nginx server configuration. Attempts to connect over HTTP fail.
221
221
@@ -228,11 +228,11 @@ Use your browser to navigate to the public IP address of the container group. Th
228
228
229
229
## Next steps
230
230
231
-
This article showed you how to set up an Nginx container to enable SSL connections to a web app running in the container group. You can adapt this example for apps that listen on ports other than port 80. You can also update the Nginx configuration file to automatically redirect server connections on port 80 (HTTP) to use HTTPS.
231
+
This article showed you how to set up an Nginx container to enable TLS connections to a web app running in the container group. You can adapt this example for apps that listen on ports other than port 80. You can also update the Nginx configuration file to automatically redirect server connections on port 80 (HTTP) to use HTTPS.
232
232
233
-
While this article uses Nginx in the sidecar, you can use another SSL provider such as [Caddy](https://caddyserver.com/).
233
+
While this article uses Nginx in the sidecar, you can use another TLS provider such as [Caddy](https://caddyserver.com/).
234
234
235
-
If you deploy your container group in an [Azure virtual network](container-instances-vnet.md), you can consider other options to enable an SSL endpoint for a backend container instance, including:
235
+
If you deploy your container group in an [Azure virtual network](container-instances-vnet.md), you can consider other options to enable a TLS endpoint for a backend container instance, including:
0 commit comments