# 2021-08-03-12:06:28+0800 Genarate client cert for topsql-prod

- Cause: https://jira.tidbcloud.com/browse/TCOC-138 
- Operation:
# genarate client cert
❯ cat>filename<<EOF
> apiVersion: cert-manager.io/v1alpha3
> kind: Certificate
> metadata:
>   name: manual-db-tidb-client-secret
>   namespace: tidb1379661944580734071
> spec:
>   duration: 8760h0m0s
>   issuerRef:
>     group: awspca.cert-manager.io
>     kind: AWSPCAClusterIssuer
>     name: aws-pca-issuer
>   renewBefore: 360h0m0s
>   secretName: manual-db-tidb-client-secret
>   subject:
>     organizations:
>     - PingCAP
>   commonName: eb2c6487
>   usages:
>   - client auth
> EOF

❯ k apply -f filename
certificate.cert-manager.io/manual-db-tidb-client-secret created

# decode client cert
❯ kubectl get secret manual-db-tidb-client-secret -o "jsonpath={.data['ca\.crt']}" | base64 -d > ca.crt
❯ kubectl get secret manual-db-tidb-client-secret -o "jsonpath={.data['tls\.crt']}" | base64 -d > tls.crt
❯ kubectl get secret manual-db-tidb-client-secret -o "jsonpath={.data['tls\.key']}" | base64 -d > tls.crt

- Impact: `NONE`
- Recovery operation: `NONE`
- Time window: 2021-08-03-12:05:28+0800~2021-08-03-12:10:28+0800
