mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
GitBook: [master] 2 pages modified
This commit is contained in:
parent
1ac548c4cc
commit
2708946dc8
@ -158,7 +158,7 @@ We will also be setting up TLS for the full mesh routes.
|
||||
)
|
||||
```
|
||||
|
||||
## Generating the certs for the clients \(CNCF && ACME\)
|
||||
### Generating the certs for the clients \(CNCF && ACME\)
|
||||
|
||||
```javascript
|
||||
{
|
||||
@ -184,14 +184,15 @@ We will also be setting up TLS for the full mesh routes.
|
||||
)
|
||||
```
|
||||
|
||||
## Kubectl Create
|
||||
### Kubectl Create
|
||||
|
||||
```
|
||||
```text
|
||||
cd certs kubectl create secret generic nats-tls-example --from-file=ca.pem --from-file=server-key.pem --from-file=server.pem kubectl create secret generic nats-tls-routes-example --from-file=ca.pem --from-file=route-key.pem --from-file=route.pem kubectl create secret generic nats-tls-client-example --from-file=ca.pem --from-file=client-key.pem --from-file=client.pem
|
||||
```
|
||||
|
||||
### Create the Auth secret
|
||||
|
||||
```js
|
||||
```javascript
|
||||
{
|
||||
"users": [
|
||||
{ "username": "CN=nats.io,OU=ACME" },
|
||||
@ -267,11 +268,11 @@ spec:
|
||||
' | kubectl apply -f -
|
||||
```
|
||||
|
||||
#### Create APP using certs
|
||||
### Create APP using certs
|
||||
|
||||
## Adding a new pod which uses the certificates
|
||||
#### Adding a new pod which uses the certificates
|
||||
|
||||
Development
|
||||
**Development**
|
||||
|
||||
```go
|
||||
package main
|
||||
@ -375,8 +376,9 @@ docker run wallyqs/nats-client-app
|
||||
docker push wallyqs/nats-client-app
|
||||
```
|
||||
|
||||
Pod spec
|
||||
```
|
||||
#### Pod spec
|
||||
|
||||
```text
|
||||
echo ' apiVersion: apps/v1beta2 kind: Deployment
|
||||
|
||||
## The name of the deployment
|
||||
@ -422,6 +424,5 @@ template: metadata: labels: name: nats-client-app spec: volumes:
|
||||
mountPath: "/etc/nats-client-tls-certs/"
|
||||
|
||||
' \| kubectl apply -f -
|
||||
|
||||
```
|
||||
|
||||
|
@ -53,7 +53,7 @@ To make the server output more lively, you can specify the `-V` flag to enable l
|
||||
|
||||
If you had created a subscriber, you should notice output on the subscriber telling you that it disconnected, and reconnected. The server output above is more interesting. You can see the subscriber send a `CONNECT` protocol message and a `PING` which was responded to by the server with a `PONG`.
|
||||
|
||||
> You can learn more about the [NATS protocol here](../nats-protocol/nats-protocol/), but more interesting than the protocol description is [an interactive demo](../nats-protocol/nats-protocol-demo.md).
|
||||
> You can learn more about the [NATS protocol here](../nats-protocol/nats-protocol/), but more intersting than the protocol description is [an interactive demo](../nats-protocol/nats-protocol-demo.md).
|
||||
|
||||
On a third terminal, publish your first message:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user