使用 cfssl 来提高 NATS 集群的安全性
使用NATS Operator 来加固 Kubernetes 中的 NATS 集群
功能:
Clients TLS setup
客户端 TLS 配置
通过密钥来授权基于 TLS 的证书
只有更新密钥才能重载证书
路由TLS设置
为每个NATS service 发布公共IP以供外部访问
证书创建
生成CA根证书
{
"CN": "nats.io",
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"OU": "nats.io"
}
]
}Setup the profiles for the Root CA, we will have 3 main profiles: one for the clients connecting, one for the servers, and another one for the full mesh routing connections between the servers.
CA根证书有三个主要的配置文件:一个用于客户端的连接,一个用于服务端,一个用于服务间的网格路由连接。
生成 NATS service 证书
首先我们生成server的证书。
Generating the NATS server routes certs 生成NATS server 路由证书
我们当然也需要为网格路由配置TLS。
为客户端生成证书(CNCF && ACME)
Kubectl Create
创建授权密钥
创建支持TLS的集群
使用证书创建应用
添加一个使用证书的pod
Development
Pod spec
最后更新于
这有帮助吗?