Skip to content

Commit

Permalink
Replaces HOSTNAME note and lints
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Vasquez <[email protected]>
  • Loading branch information
rafvasq committed Nov 24, 2023
1 parent 526496c commit 7603c54
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions docs/configuration/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SECRET_NAME="modelmesh-certificate"

Create an OpenSSL configuration file named `openssl-san.config`:

``` shell
```shell
cat > openssl-san.config << EOF
[ req ]
distinguished_name = req
Expand Down Expand Up @@ -69,7 +69,7 @@ First, define the variables that will be used in the commands below and change t

```shell
NAMESPACE="modelmesh-serving" # the controller namespace where ModelMesh Serving was deployed
SECRET_NAME="modelmesh-certificate"
SECRET_NAME="modelmesh-certificate"
HOSTNAME=localhost
```

Expand Down Expand Up @@ -117,21 +117,24 @@ HOSTNAME=localhost
kind: Issuer
EOF
```
**Note:** `${HOSTNAME}` is optional but should be set when configuring an external Kubernetes Ingress or OpenShift route as described [here](./README.md#exposing-an-external-endpoint-using-an-openshift-route).
If the certificate request is successful, a TLS secret with the PEM-encoded certs will be created as `modelmesh-serving-cert`, assuming `metadata.name` wasn't modified.
4. Wait for the certificate to be successfully issued:
```shell
kubectl get certificate/modelmesh-serving-cert --watch
```
Once you see `READY` as `True`, proceed to the next step.
```
NAME READY SECRET AGE
modelmesh-serving-cert True modelmesh-certificate 21h
```
5. Enable TLS in ModelMesh Serving by adding a value for `tls.secretName` in the ConfigMap, pointing to the secret created with the TLS key/cert details.
```shell
Expand All @@ -146,8 +149,9 @@ HOSTNAME=localhost
secretName: ${SECRET_NAME}
EOF
```
6. Retrieve the `ca.crt` (to be used in clients):
```shell
kubectl get secret ${SECRET_NAME} -o jsonpath="{.data.ca\.crt}" > ca.crt
```
```

0 comments on commit 7603c54

Please sign in to comment.