This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.3.8.3. 禁用 etcd 加密
您可以在集群中禁用 etcd 数据的加密。
先决条件
-
使用具有
cluster-admin
角色的用户访问集群。
流程
修改
APIServer
对象:oc edit apiserver
$ oc edit apiserver
Copy to Clipboard Copied! 将
encryption
字段类型设置为identity
:spec: encryption: type: identity
spec: encryption: type: identity
1 Copy to Clipboard Copied! - 1
identity
类型是默认值,意味着没有执行任何加密。
保存文件以使改变生效。
解密过程开始。根据集群的大小,这个过程可能需要 20 分钟或更长的时间才能完成。
验证 etcd 解密是否成功。
查看 OpenShift API 服务器的
Encrypted
状态条件,以验证其资源是否已成功解密:oc get openshiftapiserver -o=jsonpath='{range .items[0].status.conditions[?(@.type=="Encrypted")]}{.reason}{"\n"}{.message}{"\n"}'
$ oc get openshiftapiserver -o=jsonpath='{range .items[0].status.conditions[?(@.type=="Encrypted")]}{.reason}{"\n"}{.message}{"\n"}'
Copy to Clipboard Copied! 在成功解密后输出显示
DecryptionCompleted
:DecryptionCompleted Encryption mode set to identity and everything is decrypted
DecryptionCompleted Encryption mode set to identity and everything is decrypted
Copy to Clipboard Copied! 如果输出显示
DecryptionInProgress
,这意味着解密仍在进行中。等待几分钟后重试。查看 Kubernetes API 服务器的
Encrypted
状态条件,以验证其资源是否已成功解密:oc get kubeapiserver -o=jsonpath='{range .items[0].status.conditions[?(@.type=="Encrypted")]}{.reason}{"\n"}{.message}{"\n"}'
$ oc get kubeapiserver -o=jsonpath='{range .items[0].status.conditions[?(@.type=="Encrypted")]}{.reason}{"\n"}{.message}{"\n"}'
Copy to Clipboard Copied! 在成功解密后输出显示
DecryptionCompleted
:DecryptionCompleted Encryption mode set to identity and everything is decrypted
DecryptionCompleted Encryption mode set to identity and everything is decrypted
Copy to Clipboard Copied! 如果输出显示
DecryptionInProgress
,这意味着解密仍在进行中。等待几分钟后重试。