[英]Kubernetes-client API to run and expose a docker image
I'm having trouble finding an easy way to automate the following kubectl command lines using Kubernetes-client Java API : 我很难找到一种使用Kubernetes-client Java API自动执行以下kubectl命令行的简便方法:
$ kubectl run foo --image=bar/baz:v1 --port 8080
$ kubectl expose deployment foo --type=LoadBalancer --port 80 --target-port 8080
The first one runs a docker image on port 8080 and the second one defines it as a load balancer and expose it to port 80. 第一个在端口8080上运行docker映像,第二个将其定义为负载均衡器并将其公开到端口80。
添加-v = 9将显示这些命令发出的API请求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.