11.5. 清理
运行以下命令来删除应用程序:
$ oc delete project my-application
运行以下命令来删除 secret 存储 csi 驱动程序:
$ helm delete -n csi-secrets-store csi-secrets-store-driver
运行以下命令来删除安全性上下文约束:
$ oc adm policy remove-scc-from-user privileged \ system:serviceaccount:csi-secrets-store:secrets-store-csi-driver; oc adm policy remove-scc-from-user privileged \ system:serviceaccount:csi-secrets-store:csi-secrets-store-provider-aws
运行以下命令来删除 AWS 供应商:
$ oc -n csi-secrets-store delete -f \ https://raw.githubusercontent.com/rh-mobb/documentation/main/content/misc/secrets-store-csi/aws-provider-installer.yaml
运行以下命令来删除 AWS 角色和策略:
$ aws iam detach-role-policy --role-name openshift-access-to-mysecret \ --policy-arn $POLICY_ARN; aws iam delete-role --role-name openshift-access-to-mysecret; aws iam delete-policy --policy-arn $POLICY_ARN
运行以下命令来删除 Secrets Manager secret:
$ aws secretsmanager --region $REGION delete-secret --secret-id $SECRET_ARN