https://github.com/janrockdev/scala-k8s
Hello World example for automated Scala to Docker build (to run directly without any orchestration) or with push to DockerHub and to Kubernetes.
https://github.com/janrockdev/scala-k8s
Last synced: 10 months ago
JSON representation
Hello World example for automated Scala to Docker build (to run directly without any orchestration) or with push to DockerHub and to Kubernetes.
- Host: GitHub
- URL: https://github.com/janrockdev/scala-k8s
- Owner: janrockdev
- Created: 2019-02-10T21:10:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-10T21:23:36.000Z (over 7 years ago)
- Last Synced: 2025-01-24T19:34:44.182Z (over 1 year ago)
- Language: Scala
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
=======
Template for Scala on Kubernetes/Docker
=======
Hello World example for automated Scala to Docker build (to run directly without any orchestration) or with push to DockerHub and to Kubernetes.
.. image:: https://img.shields.io/badge/scala_template_for_k8s-v1.0.0-green.svg
:target: https://github.com/janrock-ylb?tab=repositories
:alt: Release Status
Features
--------
| Basic build to demonstrate the process from code to k8s logs.
Usage
-----
- Install Docker and Kubernetes
- Edit the example Scala code
- (option a) sbt clean, assembly -> fat jar build
- (option b) sbt clean, docker -> docker run build
- (option c) sbt clean, dockerBuildAndPush -> docker build and push to DockerHub for k8s pull
- Run set of bash scripts
startpod:
kubectl create -f scala-k8s_pod.yaml
validate:
kubectl get pods
show-logs:
kubectl logs scala-k8s
(static console output without refresh)
stop-pod:
kubectl delete pod scala-k8s
(delete pod)
docker rmi yottalabs/scala-k8s
(remove local Docker image)
Version Support
---------------
v1.0: Initial Commit
Requirements
------------
- JDK8, Scala, Docker, Kubernetes
- IntelliJ is ideal (code, sbt console and terminal as one window)
More examples will be available soon...