1

python kubernetes客户端等效于什么

kubectl get deploy -o yaml 

CRUD python 客户端示例

我参考了这个示例来获取 python 部署,但没有读取部署选项

4

1 回答 1

3

read_namespaced_deployment()做这件事:

from kubernetes import client, config
config.load_kube_config()
api = client.AppsV1Api()

deployment = api.read_namespaced_deployment(name='foo', namespace='bar')
于 2022-02-02T08:21:42.017 回答