@@ -292,6 +292,10 @@ And also the configmap:
292
292
```shell
293
293
kubectl create configmap nginxconfigmap --from-file=default.conf
294
294
```
295
+
296
+ You can find an example for `default.conf` in
297
+ [the Kubernetes examples project repo](https://github.com/kubernetes/examples/tree/bc9ca4ca32bb28762ef216386934bef20f1f9930/staging/https-nginx/).
298
+
295
299
```
296
300
configmap/nginxconfigmap created
297
301
```
@@ -302,6 +306,49 @@ kubectl get configmaps
302
306
NAME DATA AGE
303
307
nginxconfigmap 1 114s
304
308
```
309
+
310
+ You can view the details of the `nginxconfigmap` ConfigMap using the following command:
311
+
312
+ ```shell
313
+ kubectl describe configmap nginxconfigmap
314
+ ```
315
+
316
+ The output is similar to:
317
+
318
+ ```console
319
+ Name: nginxconfigmap
320
+ Namespace: default
321
+ Labels: <none>
322
+ Annotations: <none>
323
+
324
+ Data
325
+ ====
326
+ default.conf:
327
+ ----
328
+ server {
329
+ listen 80 default_server;
330
+ listen [::]:80 default_server ipv6only=on;
331
+
332
+ listen 443 ssl;
333
+
334
+ root /usr/share/nginx/html;
335
+ index index.html;
336
+
337
+ server_name localhost;
338
+ ssl_certificate /etc/nginx/ssl/tls.crt;
339
+ ssl_certificate_key /etc/nginx/ssl/tls.key;
340
+
341
+ location / {
342
+ try_files $uri $uri/ =404;
343
+ }
344
+ }
345
+
346
+ BinaryData
347
+ ====
348
+
349
+ Events: <none>
350
+ ```
351
+
305
352
Following are the manual steps to follow in case you run into problems running make (on windows for example):
306
353
307
354
```shell
@@ -311,7 +358,7 @@ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /d/tmp/nginx.key -ou
311
358
cat /d/tmp/nginx.crt | base64
312
359
cat /d/tmp/nginx.key | base64
313
360
```
314
-
361
+
315
362
Use the output from the previous commands to create a yaml file as follows.
316
363
The base64 encoded value should all be on a single line.
317
364
@@ -476,5 +523,3 @@ LoadBalancer Ingress: a320587ffd19711e5a37606cf4a74574-1142138393.us-east-1.el
476
523
* Learn more about [Using a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/)
477
524
* Learn more about [Connecting a Front End to a Back End Using a Service](/docs/tasks/access-application-cluster/connecting-frontend-backend/)
478
525
* Learn more about [Creating an External Load Balancer](/docs/tasks/access-application-cluster/create-external-load-balancer/)
479
-
480
-
0 commit comments