2020
10-08
10-08
使用python脚本自动生成K8S-YAML的方法示例
1、生成servie.yaml1.1、yaml转jsonservice模板yamlapiVersion:v1kind:Servicemetadata:name:${jarName}labels:name:${jarName}version:v1spec:ports:-port:${port}targetPort:${port}selector:name:${jarName}转成json的结构{"apiVersion":"v1","kind":"Service","metadata":{"name":"${jarName}","labels":{"name":"${jarName}","version":"v1"}},"spec":{"ports":[{...
继续阅读 >