Kubernetes-在命名空间之间共享秘密 [英] Kubernetes - sharing secret across namespaces

查看:164
本文介绍了Kubernetes-在命名空间之间共享秘密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以在Kubernetes中的各个命名空间之间共享机密?

Is there a way to share secrets across namespaces in Kubernetes?

我的用例是:我的所有名称空间都有相同的私有注册表,并且我想避免为每个名称空间创建相同的秘密.

My use case is: I have the same private registry for all my namespaces and I want to avoid creating the same secret for each.

感谢您的帮助.

推荐答案

秘密API对象位于名称空间中.它们只能由同一名称空间中的pod引用.基本上,您将必须为每个名称空间创建秘密.

Secret API objects reside in a namespace. They can only be referenced by pods in that same namespace. Basically, you will have to create the secret for every namespace.

https://kubernetes.io/docs/concepts/configuration/secret/#详细信息

这篇关于Kubernetes-在命名空间之间共享秘密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆