简体   繁体   English

如何使用 Spinnaker 和 Hashicorp Vault 创建 kubernetes 机密

[英]How to create a kubernetes secret using Spinnaker and Hashicorp Vault

We have a whole bunch of secrets on our Hashicorp Vault server.我们的 Hashicorp Vault 服务器上有一大堆秘密。 We have started testing out spinnaker for deploying on Kubernetes but I do not see any documentation around how to create a secret on kubernetes reading from Hashicorp Vault.我们已经开始测试用于在 Kubernetes 上部署的三角帆,但我没有看到任何有关如何在 kubernetes 上从 Hashicorp Vault 读取的文件。

Can someone point me in the right direction for this?有人可以为此指出正确的方向吗? Is it even advisable to create secrets using Spinnaker or should we just use it strictly for deployments?是否建议使用 Spinnaker 创建秘密,或者我们应该只将其严格用于部署?

The problem with creating secret via spinnaker is that where do you keep the content of the secret in the first place to be able to create a secret from it.通过大三角帆创建秘密的问题在于,您首先将秘密的内容保存在哪里,以便能够从中创建秘密。 Wherever you keep it it introduces a risk of compromise.无论你把它放在哪里,它都会带来妥协的风险。 So I would suggest to create the secret dynamically at runtime using a sidecar injector.所以我建议在运行时使用边车注入器动态创建秘密。

HashiCorp Vault sidecar injector agent is a tool that can be used for this purpose. HashiCorp Vault 边车注入器代理是一种可用于此目的的工具。 The injector is a Kubernetes Mutation Webhook Controller.注入器是 Kubernetes 突变 Webhook Controller。 The controller intercepts pod events and applies mutations to the pod if annotations exist within the request.如果请求中存在注释,controller 会拦截 pod 事件并将突变应用于 pod。

Since the secret gets injected directly into the pod as VolumeMounts from the Vault Server the chance of compromise is less compared to creating a secret via Spinnaker由于秘密作为 VolumeMounts 从 Vault 服务器直接注入到 pod 中,因此与通过 Spinnaker 创建秘密相比,泄露的机会更少

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Hashicorp Vault 中更新机密时如何重新启动 Kubernetes pod? - How to restart Kubernetes pod when a secret is updated in Hashicorp Vault? 如何在领事(Hashicorp-consul)中将保险库(Hashicorp-vault)注册为服务,我使用的是kubernetes? - How to register vault (Hashicorp-vault) as a service in consul (Hashicorp-consul), I am using kubernetes? Hashicorp Vault作为Kubernetes上的StatefulSet - Hashicorp Vault as a StatefulSet on Kubernetes 未在 kubernetes 中获取 Hashicorp 保险库机密 - Hashicorp vault secrets not fetched in kubernetes HashiCorp Vault 用于填充 kubernetes 的秘密 - HashiCorp Vault to populate kubernetes secrets 如何在 Kubernetes 中为 HashiCorp Vault UI 设置入口 - How do I setup ingress for HashiCorp Vault UI in Kubernetes 如何使用 Kubernetes/minikube 声明性地配置 hashicorp 保险库? - How do I declaratively configure hashicorp vault with Kubernetes/minikube? 如何从 Kubernetes 将秘密写入 HashiCorp Valut 或 Azure Key Vault? - How to write secrets to HashiCorp Valut or Azure Key Vault from Kubernetes? 是否可以使用 Terraform 中的 Azure Key Vault 数据资源创建 tls kube.netes secret? - Is it possible to create a tls kubernetes secret using Azure Key Vault data resources in Terraform? 从 hashcorp vault 填充 kubernetes Configmap - Populate kubernetes Configmap from hashicorp vault
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM