$ kubectl create -f https://raw.githubusercontent.com/apache/incubator-heron/master/deploy/kubernetes/general/zookeeper.yaml $ kubectl get pods NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 0 1m # wait until zk-0 STATUS is Running before proceeding to the next steps
$ kubectl create -f https://raw.githubusercontent.com/apache/incubator-heron/master/deploy/kubernetes/general/bookkeeper.yaml
This deploys bookkeeper in a DaemonSet
and requires the ability of exposing hostPort
for pods communication. In some environments like K8S on DC/OS, hostPort
is not well supported. You can consider deploying bookkeeper in a StatefulSet
with Persistent Volumes
as below. Please see Persistent Volumes for more details.
$ kubectl create -f https://raw.githubusercontent.com/apache/incubator-heron/master/deploy/kubernetes/general/bookkeeper.statefulset.yaml
$ kubectl create -f https://raw.githubusercontent.com/apache/incubator-heron/master/deploy/kubernetes/general/tools.yaml
$ kubectl create -f https://raw.githubusercontent.com/apache/incubator-heron/master/deploy/kubernetes/general/apiserver.yaml
We will start a proxy to the cluster and then construct a proxy url to access the API server.
$ kubectl proxy -p 8001
$ curl http://localhost:8001/api/v1/proxy/namespaces/default/services/heron-apiserver:9000/api/v1/version { "heron.build.git.revision" : "bf9fe93f76b895825d8852e010dffd5342e1f860", "heron.build.git.status" : "Clean", "heron.build.host" : "ci-server-01", "heron.build.time" : "Sun Oct 1 20:42:18 UTC 2017", "heron.build.timestamp" : "1506890538000", "heron.build.user" : "release-agent1", "heron.build.version" : "0.16.2" }
$ heron config kubernetes \ set service_url http://localhost:8001/api/v1/proxy/namespaces/default/services/heron-apiserver:9000 \ org.apache.heron.examples.api.AckingTopology acking
$ heron submit kubernetes ~/.heron/examples/heron-api-examples.jar \ org.apache.heron.examples.api.AckingTopology acking
http://localhost:8001/api/v1/proxy/namespaces/default/services/heron-ui:8889