Kubernetes-client API to run and expose a docker image

12/12/2017

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.

-- Max
java
kubectl
kubernetes

1 Answer

12/12/2017

Adding -v=9 shows the API requests made by those commands

-- Jordan Liggitt
Source: StackOverflow