Reputation: 337
I'm having trouble finding an easy way to automate the following kubectl command lines using Kubernetes-client Java API :
$ 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.
Upvotes: 0
Views: 222