Hello World - Scala using Akka HTTP
Follow the steps below to create the sample code and then deploy the app to your cluster. You can also download a working copy of the sample, by running the following commands:
- A Kubernetes cluster installation with Knative Serving up and running.
Configuring the Service descriptor
Importantly, in service.yaml change the image reference to match up with your designated repository, i.e. replace {username}
with your Dockerhub username in the example below.
apiVersion: serving.knative.dev/v1
kind: Service
name: helloworld-scala
namespace: default
spec:
template:
- image: docker.io/{username}/helloworld-scala
env:
- name: TARGET
value: "Scala Sample v1"
Deploying to Knative Serving
Apply the Service yaml definition:
kubectl apply --filename service.yaml
Then find the service host:
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.