k8s client-go使用舉例
阿新 • • 發佈:2018-12-14
容器中執行命令:
建立client和controller:https://zhuanlan.zhihu.com/p/34192361
code-generagtor:
(1)生成全部功能API server, controler,client:
http://www.infoq.com/cn/articles/kubernetes-status-management-and-extension
(2)生成client端程式碼:
初步使用方法:http://www.mamicode.com/info-detail-2313039.html
https://kknews.cc/other/6586rql.html
(3)k8s三種client使用:
https://blog.csdn.net/yevvzi/article/details/52768288
clientset:https://blog.csdn.net/yevvzi/article/details/52768288(k8s核心已經有的資源,使用方便,固定)
dynamicclient:https://blog.csdn.net/yevvzi/article/details/54380944(比clientset靈活,加入thirdparty的各種操作介面,比clientset稍微麻煩,需要自定義引數較多)
restclient:https://blog.csdn.net/yevvzi/article/details/54426775