Deploy on Kubernetes


Install the following:


Once minikube is running the application can be deployed using:

$ eval $(minikube docker-env)
$ sbt docker:publishLocal
$ kustomize build deployment/overlays/minikube | kubectl apply -f -

Verify the deployment status:

$ kubectl get all
NAME                                                         READY   STATUS    RESTARTS   AGE
pod/play-java-grpc-example-v1-0-snapshot-6c7b575d86-9ql9r   1/1     Running   0          3m
pod/play-java-grpc-example-v1-0-snapshot-6c7b575d86-jlsfq   1/1     Running   0          3m

NAME                              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)               AGE
service/kubernetes                ClusterIP       <none>        443/TCP               17h
service/play-java-grpc-example   ClusterIP   <none>        9000/TCP,9443/TCP     3m

NAME                                                    DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/play-java-grpc-example-v1-0-snapshot   2         2         2            2           3m

NAME                                                               DESIRED   CURRENT   READY   AGE
replicaset.apps/play-java-grpc-example-v1-0-snapshot-6c7b575d86   2         2         2       3m

And send a request:

$ curl -H "Host:"  http://`minikube ip`/
Hello, Caplin!