kubernetes kubectl的简单包装
kubeconfig的Python项目详细描述
kubeconfig是一个简单的python模块,用于操作kubernetes kubeconfig 文件夹。
fromkubeconfigimportKubeConfigconf=KubeConfig()conf.set_context('new-context',cluster='other-cluster',user='my-user')conf.use_context('new-context')print(conf.view())
安装
pip install kubeconfig
示例使用案例
- 为用户生成配置
- 管理多个集群或用户之间切换的工具
- 在配置中循环输出凭据
- 更新配置中的ca cert条目
文档
有关用法的详细信息,请参见documentation。
许可证
Kubeconfig根据BSD 3条款许可证获得许可。