5

有谁知道在哪种情况下选择 Kubernetes 机密而不是谷歌机密管理器,反之亦然?两者的区别?

4

1 回答 1

6

With Kubernetes secret (K8S Secret), you use a built in feature of K8S. You load your secrets in config maps, and you mount them on the pods that require them.

PRO

If a day you want to deploy on AWS, Azure or on prem, still on K8S, the behavior will be the same, no update to perform in your code.

CONS

The secrets are only accessible by K8S cluster, impossible to reuse them with another GCP services

Note: With GKE, no problem the ETCD component is automatically encrypted with a key form KMS service to keep the secret encrypted at rest. But, it's not always the same for every K8S installation, especially on premise, where the secrets are kept in plain text. Be aware about this part of the security.


Secret Manager is a vault managed by Google. You have API to read and write them and the IAM service checks the authorization.

PRO

It's a Google Cloud service and you can access it from any GCP services (Compute Engine, Cloud Run, App Engine, Cloud Functions, GKE,....) as long as you are authorized for

CONS

It's Google Cloud specific product, you are locked in.

于 2020-11-23T08:25:59.463 回答