1.3. 使用您自己的可观察证书颁发机构 (CA) 证书
安装 Red Hat Advanced Cluster Management for Kubernetes 时,默认只为可观察性提供证书颁发机构 (CA)证书。如果您不想使用 Red Hat Advanced Cluster Management 生成的默认可观察性 CA 证书,您可以在启用可观察性前选择使用自己的可观察 CA 证书。
1.3.1. 使用 OpenSSL 命令生成 CA 证书 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Observability 需要两个 CA 证书,一个用于服务器端,另一个用于客户端。
使用以下命令生成您的 CA RSA 私钥:
openssl genrsa -out serverCAKey.pem 2048 openssl genrsa -out clientCAKey.pem 2048
openssl genrsa -out serverCAKey.pem 2048 openssl genrsa -out clientCAKey.pem 2048Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用私钥生成自签名 CA 证书。运行以下命令:
openssl req -x509 -sha256 -new -nodes -key serverCAKey.pem -days 1825 -out serverCACert.pem openssl req -x509 -sha256 -new -nodes -key clientCAKey.pem -days 1825 -out clientCACert.pem
openssl req -x509 -sha256 -new -nodes -key serverCAKey.pem -days 1825 -out serverCACert.pem openssl req -x509 -sha256 -new -nodes -key clientCAKey.pem -days 1825 -out clientCACert.pemCopy to Clipboard Copied! Toggle word wrap Toggle overflow
1.3.2. 创建与您自己的可观察 CA 证书关联的 secret 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
完成以下步骤以创建 secret:
使用您的证书和私钥创建
observability-server-ca-certssecret。运行以下命令:oc -n open-cluster-management-observability create secret tls observability-server-ca-certs --cert ./serverCACert.pem --key ./serverCAKey.pem
oc -n open-cluster-management-observability create secret tls observability-server-ca-certs --cert ./serverCACert.pem --key ./serverCAKey.pemCopy to Clipboard Copied! Toggle word wrap Toggle overflow 使用您的证书和私钥创建
observability-client-ca-certssecret。运行以下命令:oc -n open-cluster-management-observability create secret tls observability-client-ca-certs --cert ./clientCACert.pem --key ./clientCAKey.pem
oc -n open-cluster-management-observability create secret tls observability-client-ca-certs --cert ./clientCACert.pem --key ./clientCAKey.pemCopy to Clipboard Copied! Toggle word wrap Toggle overflow
1.3.3. 其他资源 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
- 请参阅 自定义路由认证。
- 请参阅 自定义用于访问对象存储的证书。