From 972a46738e7e9c4b125c0c23888c22af6b940474 Mon Sep 17 00:00:00 2001 From: Hasan Rashid <hasanrashid@users.noreply.github.com> Date: Tue, 10 Oct 2023 03:19:02 -0400 Subject: [PATCH] Remove redudant steps from instruction (#41953) * Remove redudant steps from instruction * Update content/en/docs/tutorials/services/connect-applications-service.md Co-authored-by: Michael <haifeng.yao@daocloud.io> * Update content/en/docs/tutorials/services/connect-applications-service.md Co-authored-by: Michael <haifeng.yao@daocloud.io> * Update content/en/docs/tutorials/services/connect-applications-service.md Co-authored-by: Michael <haifeng.yao@daocloud.io> * Update content/en/docs/tutorials/services/connect-applications-service.md Co-authored-by: Michael <haifeng.yao@daocloud.io> * Update content/en/docs/tutorials/services/connect-applications-service.md Co-authored-by: Tim Bannister <tim@scalefactory.com> * Update content/en/docs/tutorials/services/connect-applications-service.md Co-authored-by: Michael <haifeng.yao@daocloud.io> * Change line 313, and add missing line * Fix missing command end on line 313 * Update connect-applications-service.md --------- Co-authored-by: Michael <haifeng.yao@daocloud.io> Co-authored-by: Tim Bannister <tim@scalefactory.com> Co-authored-by: Qiming Teng <tengqm@outlook.com> --- .../services/connect-applications-service.md | 51 +++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/content/en/docs/tutorials/services/connect-applications-service.md b/content/en/docs/tutorials/services/connect-applications-service.md index 2c7cdf94f8558..771149566b422 100644 --- a/content/en/docs/tutorials/services/connect-applications-service.md +++ b/content/en/docs/tutorials/services/connect-applications-service.md @@ -292,6 +292,10 @@ And also the configmap: ```shell kubectl create configmap nginxconfigmap --from-file=default.conf ``` + +You can find an example for `default.conf` in +[the Kubernetes examples project repo](https://github.com/kubernetes/examples/tree/bc9ca4ca32bb28762ef216386934bef20f1f9930/staging/https-nginx/). + ``` configmap/nginxconfigmap created ``` @@ -302,6 +306,49 @@ kubectl get configmaps NAME DATA AGE nginxconfigmap 1 114s ``` + +You can view the details of the `nginxconfigmap` ConfigMap using the following command: + +```shell +kubectl describe configmap nginxconfigmap +``` + +The output is similar to: + +```console +Name: nginxconfigmap +Namespace: default +Labels: <none> +Annotations: <none> + +Data +==== +default.conf: +---- +server { + listen 80 default_server; + listen [::]:80 default_server ipv6only=on; + + listen 443 ssl; + + root /usr/share/nginx/html; + index index.html; + + server_name localhost; + ssl_certificate /etc/nginx/ssl/tls.crt; + ssl_certificate_key /etc/nginx/ssl/tls.key; + + location / { + try_files $uri $uri/ =404; + } +} + +BinaryData +==== + +Events: <none> +``` + Following are the manual steps to follow in case you run into problems running make (on windows for example): ```shell @@ -311,7 +358,7 @@ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /d/tmp/nginx.key -ou cat /d/tmp/nginx.crt | base64 cat /d/tmp/nginx.key | base64 ``` - + Use the output from the previous commands to create a yaml file as follows. The base64 encoded value should all be on a single line. @@ -476,5 +523,3 @@ LoadBalancer Ingress: a320587ffd19711e5a37606cf4a74574-1142138393.us-east-1.el * Learn more about [Using a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/) * Learn more about [Connecting a Front End to a Back End Using a Service](/docs/tasks/access-application-cluster/connecting-frontend-backend/) * Learn more about [Creating an External Load Balancer](/docs/tasks/access-application-cluster/create-external-load-balancer/) - -