example to deploy docker image on kubernetes from

2019-09-11 11:19发布

问题:

I am trying to find an example that helps deploy a docker image on the kubernetes cluster from java. I came across fabric8,(http://fabric8.io/) that does this but could not find a specific example or API reference

回答1:

There is an example of creating a Replication controller here:

https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-examples/src/main/java/io/fabric8/kubernetes/examples/FullExample.java#L75

Creating a Replication Controller is an indirect but recommended way to create a pod.

A pod has one or more docker containers in it.